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.cssresolve 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:
# macOS / LinuxROOT_BASE=/JoeDocs/ npm run build
# Windows PowerShell$env:ROOT_BASE='/JoeDocs/'; npm run build; Remove-Item Env:ROOT_BASEIf you move JoeDocs to a custom domain or a <user>.github.io root repository, change ROOT_BASE to /.
Enabling Giscus comments
Section titled “Enabling Giscus comments”Starlight sites created from templates/starlight-docs/ include a theme-synced Giscus comments component in src/components/Footer.astro.
- Enable Discussions in your GitHub repository settings and install the Giscus GitHub App.
- Generate your configuration values at giscus.app.
- Either commit the values in
src/config/giscus.tsor provide them as build-time environment variables:GISCUS_REPOGISCUS_REPO_IDGISCUS_CATEGORYGISCUS_CATEGORY_ID
The footer automatically syncs Giscus’s light and dark themes whenever a reader toggles Starlight’s theme switcher.