plyght
2024-11-22 e1d754ef79e8c04d6fe0f9031ce74baf48d3bb10
docs/hosting.md
@@ -61,7 +61,8 @@
        with:
          fetch-depth: 0 # Fetch all history for git info
      - uses: actions/setup-node@v4
        node-version: 22
        with:
          node-version: 22
      - name: Install Dependencies
        run: npm ci
      - name: Build Quartz
@@ -207,7 +208,7 @@
    paths:
      - public
  tags:
    - docker
    - gitlab-org-docker
pages:
  stage: deploy
@@ -246,6 +247,28 @@
}
```
### Using Apache
Here's an example of how to do this with Apache:
```apache title=".htaccess"
RewriteEngine On
ErrorDocument 404 /404.html
# Rewrite rule for .html extension removal (with directory check)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_URI}.html -f
RewriteRule ^(.*)$ $1.html [L]
# Handle directory requests explicitly
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*)/$ $1/index.html [L]
```
Don't forget to activate brotli / gzip compression.
### Using Caddy
Here's and example of how to do this with Caddy: