Environment Variables
The theme reads environment variables at build time from config.ts and custom components. Content repositories set these in their GitHub Actions workflow to customize each site without modifying the configuration.
Variable Reference
Section titled “Variable Reference”| Variable | Default | Purpose |
|---|---|---|
DOCS_TITLE | Documentation | Site title shown in the header and browser tab |
DOCS_SITE | https://f5xc-salesdemos.github.io | Canonical base URL for the deployed site |
DOCS_BASE | / | URL base path (e.g., /my-repo/ for project sites) |
DOCS_DESCRIPTION | (empty string) | Site description for metadata and the llms.txt plugin |
DOCS_HOME | https://f5xc-salesdemos.github.io/docs/ | Home page URL linked from the site title |
GITHUB_REPOSITORY | (empty string) | Used to build the GitHub social link and edit links |
LLMS_OPTIONAL_LINKS | [] | JSON array of additional links for the llms.txt plugin |
Where Each Variable Is Used
Section titled “Where Each Variable Is Used”DOCS_TITLE
Section titled “DOCS_TITLE”const title = options.title || process.env.DOCS_TITLE || 'Documentation';Passed to the Starlight title option and the starlight-llms-txt plugin. Appears in the site header and the HTML <title> tag.
DOCS_SITE
Section titled “DOCS_SITE”const site = options.site || process.env.DOCS_SITE || 'https://f5xc-salesdemos.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 = options.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_DESCRIPTION
Section titled “DOCS_DESCRIPTION”const description = options.description || process.env.DOCS_DESCRIPTION || '';Passed to the starlight-llms-txt plugin as the site description. Used in the generated llms.txt file.
DOCS_HOME
Section titled “DOCS_HOME”const docsHome = process.env.DOCS_HOME || 'https://f5xc-salesdemos.github.io/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”const githubRepository = options.githubRepository || process.env.GITHUB_REPOSITORY || '';Used to generate the GitHub social icon in the site header and the edit link base URL. GitHub Actions sets this variable automatically (e.g., owner/repo).
LLMS_OPTIONAL_LINKS
Section titled “LLMS_OPTIONAL_LINKS”const llmsOptionalLinks = options.llmsOptionalLinks || (process.env.LLMS_OPTIONAL_LINKS ? JSON.parse(process.env.LLMS_OPTIONAL_LINKS) : []);A JSON-encoded array of { title, url } objects passed to the starlight-llms-txt plugin. These appear as additional links in the generated llms.txt file.
Example value:
[{"title": "API Reference", "url": "https://api.example.com/docs"}]Setting Variables in GitHub Actions
Section titled “Setting Variables in GitHub Actions”Content repositories pass these variables through their workflow:
jobs: docs: uses: f5xc-salesdemos/docs-control/.github/workflows/github-pages-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.