Environment Variables
The theme reads environment variables at build time from astro.config.mjs and custom components. Content repositories set these in their GitHub Actions workflow to customize each site without forking the theme.
Variable Reference
Section titled “Variable Reference”| Variable | Default | Purpose |
|---|---|---|
DOCS_TITLE | Documentation | Site title shown in the header and browser tab |
DOCS_SITE | https://robinmordasiewicz.github.io | Canonical base URL for the deployed site |
DOCS_BASE | / | URL base path (e.g., /my-repo/ for project sites) |
DOCS_HOME | https://robinmordasiewicz.github.io/f5xc-docs/ | Home page URL linked from the site title |
GITHUB_REPOSITORY | (empty string) | Used to build the GitHub social link in the header |
Where Each Variable Is Used
Section titled “Where Each Variable Is Used”DOCS_TITLE
Section titled “DOCS_TITLE”const title = process.env.DOCS_TITLE || 'Documentation';Passed to the Starlight title option. Appears in the site header and the HTML <title> tag.
DOCS_SITE
Section titled “DOCS_SITE”const site = process.env.DOCS_SITE || 'https://robinmordasiewicz.github.io';Sets Astro’s top-level site property. Used for canonical URLs, sitemap generation, and Open Graph metadata.
DOCS_BASE
Section titled “DOCS_BASE”const base = process.env.DOCS_BASE || '/';Sets Astro’s top-level base property. Required when deploying to a subdirectory (e.g., https://example.github.io/my-repo/).
DOCS_HOME
Section titled “DOCS_HOME”const docsHome = process.env.DOCS_HOME || 'https://robinmordasiewicz.github.io/f5xc-docs/';Read by the custom SiteTitle.astro component. Wraps the site title in the header with a link to this URL, allowing users to navigate back to a central documentation home page. Useful when multiple content repositories share the same theme and you want a consistent “home” link across all sites.
GITHUB_REPOSITORY
Section titled “GITHUB_REPOSITORY”{ label: 'GitHub', icon: 'github', href: `https://github.com/${process.env.GITHUB_REPOSITORY || ''}`,}Used in the Starlight social array to generate the GitHub link in the site header. GitHub Actions sets this variable automatically (e.g., owner/repo).
Setting Variables in GitHub Actions
Section titled “Setting Variables in GitHub Actions”Content repositories pass these variables through their workflow:
jobs: docs: uses: robinmordasiewicz/f5xc-template/.github/workflows/docs-build-deploy.yml@main with: docs_title: "My Project Docs" docs_site: "https://example.github.io" docs_base: "/my-project/" docs_home: "https://example.github.io/home/"The GITHUB_REPOSITORY variable is provided automatically by the GitHub Actions runner and does not need to be set manually.