Site metadata

View source

Configure the title, description, logo, favicon, repository, and CSS entrypoint.

typescript
export default {
  title: "Project Documentation",
  description: "Reference and guides for the project.",
  siteUrl: "https://docs.example.com",
  seo: {
    image: "/social-card.png",
    imageAlt: "Project Docs documentation",
    locale: "en_US",
    twitterCard: "summary_large_image",
  },
  favicon: "/favicon.ico",
  contentDir: "docs",
  css: "src/index.css",
  logo: {
    text: "Project Docs",
    image: "/logo.svg",
    href: "/",
  },
};
  • title is used in the navbar and browser titles.
  • description is the fallback description for pages without frontmatter.
  • siteUrl enables canonical URLs in generated HTML.
  • A page can set updatedAt in frontmatter to include an ISO date in the sitemap.
  • A page can set noindex: true in frontmatter to emit a noindex robots meta tag and exclude the page from the sitemap.
  • seo.image and seo.imageAlt configure social preview metadata.
  • seo.siteName optionally overrides the site title used in social and structured metadata.
  • seo.locale and seo.twitterCard configure social metadata defaults.
  • favicon sets the favicon path or URL.
  • contentDir selects the MDX directory. The default is docs.
  • css points to a consumer-owned CSS entrypoint.
  • logo.image is served from the consumer project's public assets.

Site UI translations

The default theme can load its static interface text from JSON files. Configure the directory relative to the project root and the fallback locale through the i18n plugin in your project's docs.config.ts:

typescript
import { createI18nPlugin } from "@/plugins/i18n";

export default {
  plugins: [
    createI18nPlugin({
      defaultLocale: "en",
      locales: ["en", "ka"],
      translations: { directory: "locales" },
    }),
  ],
};

The directory contains one JSON file per locale, such as locales/en.json and locales/ka.json. Translation keys are validated against Folio's typed catalog; unknown keys fail configuration loading instead of being silently ignored. Missing keys fall back to the default locale. Translation files belong to the consumer project; Folio does not ship a site-specific language catalog. The default theme exposes the global locale selector in the navbar when multiple locale catalogs are available and disables locales without a matching page variant for the current page.

When repository is configured, the default theme adds a View source link to each documentation page:

typescript
export default {
  repository: {
    url: "https://github.com/example/project",
    branch: "main",
    rootDir: "",
  },
};

branch defaults to main. Set rootDir when the documentation project is nested inside the repository, for example "apps/docs". The configured contentDir is appended automatically. GitHub, GitLab, and Bitbucket URLs are supported.