Skip to content

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.

VariableDefaultPurpose
DOCS_TITLEDocumentationSite title shown in the header and browser tab
DOCS_SITEhttps://robinmordasiewicz.github.ioCanonical base URL for the deployed site
DOCS_BASE/URL base path (e.g., /my-repo/ for project sites)
DOCS_HOMEhttps://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
const title = process.env.DOCS_TITLE || 'Documentation';

Passed to the Starlight title option. Appears in the site header and the HTML <title> tag.

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.

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

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.

{
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).

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.