Skip to content

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.

VariableDefaultPurpose
DOCS_TITLEDocumentationSite title shown in the header and browser tab
DOCS_SITEhttps://f5xc-salesdemos.github.ioCanonical 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_HOMEhttps://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
config.ts
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.

config.ts
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.

config.ts
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/).

config.ts
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.

components/SiteTitle.astro
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.

config.ts
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).

config.ts
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"}]

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.