Skip to content

Deployment & Giscus

JoeDocs includes a GitHub Actions workflow at .github/workflows/deploy.yml that builds all sub-sites and publishes dist/ to GitHub Pages on every push to master.

Hosting under /JoeDocs/ (GitHub Pages subpath)

Section titled “Hosting under /JoeDocs/ (GitHub Pages subpath)”

When hosted at https://Histar4522.github.io/JoeDocs/, ROOT_BASE must be /JoeDocs/ so that:

  • Central hub links and styles.css resolve under /JoeDocs/.
  • Every sub-site receives SITE_BASE=/JoeDocs/<slug>/.
  • Back-to-hub links (process.env.ROOT_BASE || '/') point back to /JoeDocs/.

.github/workflows/deploy.yml sets ROOT_BASE: /JoeDocs/ and HUB_REPO_URL automatically. To test the exact same subpath build locally before pushing:

Terminal window
# macOS / Linux
ROOT_BASE=/JoeDocs/ npm run build
# Windows PowerShell
$env:ROOT_BASE='/JoeDocs/'; npm run build; Remove-Item Env:ROOT_BASE

If you move JoeDocs to a custom domain or a <user>.github.io root repository, change ROOT_BASE to /.

Starlight sites created from templates/starlight-docs/ include a theme-synced Giscus comments component in src/components/Footer.astro.

  1. Enable Discussions in your GitHub repository settings and install the Giscus GitHub App.
  2. Generate your configuration values at giscus.app.
  3. Either commit the values in src/config/giscus.ts or provide them as build-time environment variables:
    • GISCUS_REPO
    • GISCUS_REPO_ID
    • GISCUS_CATEGORY
    • GISCUS_CATEGORY_ID

The footer automatically syncs Giscus’s light and dark themes whenever a reader toggles Starlight’s theme switcher.