Global settings
Reference for common site, navigation, search, and discovery settings in publier.config.yaml.
The publier.config.yaml file at your project root controls site-wide settings — name, navigation, search, analytics, fonts, and snippets.
A key that Publier does not know, such as analytic: for analytics:, no longer passes silently. The build and the dev server print one warning per unknown key, and suggest the closest valid key when there is one (Did you mean "analytics"?). The warning never fails the build, so a key that another tool reads is safe to keep. An unknown key under site fails the build and names the suggestion.
Full example
site: name: My Docs url: https://docs.example.com
nav: default: links: - label: GitHub href: https://github.com/my-org/my-docs external: true
sidebar: defaultOpenLevel: 2
search: enabled: true
llms: enabled: true
snippets: directory: src/content/snippetsSite
| Field | Type | Required | Description |
|---|---|---|---|
site.name | string | Yes | Site name — header, browser tab, meta tags |
site.url | string | — | Production URL for sitemap, OG images, canonical links |
site.footer | string | — | Footer text. Omit it, and site.footerLinks, to render no footer |
site.footerLinks[] | array | — | Links shown in the footer of every page (@publier/shell 0.15.0 or later); see Footer links |
Navigation
| Field | Type | Default | Description |
|---|---|---|---|
nav.default.links[].label | string | — | Link text |
nav.default.links[].href | string | — | Destination for a plain link; omit for a group |
nav.default.links[].external | boolean | false | Open in a new tab with rel="noopener" |
nav.default.links[].items | array | — | One level of destination links, also supported in nav.tabs |
nav.default.links[].items[].label | string | — | Destination name |
nav.default.links[].items[].href | string | — | Destination URL |
nav.default.links[].items[].description | string | — | Optional short destination description |
nav.default.links[].items[].external | boolean | false | Open the destination in a new tab |
GitHub links auto-render as icon buttons. Other external links render as text. See Navigation for variants and pathRules.
Sidebar
| Field | Type | Default | Description |
|---|---|---|---|
sidebar.defaultOpenLevel | number | 1 | Sidebar levels expanded by default |
sidebar.defaultOpenLevel is a non-negative integer: 1 opens top-level folders, 0 collapses folders by default, and 2 opens two levels. Folder-specific collapsed values in docs.sidebar.meta override that default. On render and navigation, the current page’s folder and ancestors open even if configured collapsed; readers can still collapse them.
Appearance
appearance: default: system strict: falseappearance.default accepts system, light, or dark; the defaults are system and strict: false. Readers can choose light, dark, or auto, with explicit choices saved in localStorage across navigation and reloads. Auto returns to the configured default and follows the OS only when that default is system. With strict: true, the switch is hidden and stored reader choices are ignored; strict system mode still follows OS changes.
appearance.pathRules (@publier/shell 0.8.0 or later) sets the behaviour per path, so a site can keep its marketing pages in one scheme and offer the switch on its docs. Rules use the glob vocabulary of nav.pathRules, the first match wins, and a field a rule omits keeps the site-wide value:
appearance: default: light strict: true pathRules: - { path: /docs/**, default: system, strict: false } - { path: /docs, default: system, strict: false }Each page’s setting also applies after a client-side navigation, so moving from a locked page into the docs, or back, shows the right scheme without a reload. A locked page ignores a reader’s stored choice and leaves it in place for the next page that offers the switch. Give the theme’s colours dark values too (theming), or the pages that offer dark mode keep light surfaces.
Documentation sections
Group documentation by content-folder paths, including nested paths:
docs: tabSections: [platform, platform/api, integrations]Add a landing page such as src/content/docs/platform/index.mdx for each section. Its title becomes the label in breadcrumbs and in the header’s fallback section links. The default docs route shows only the current section’s sidebar. When no docs navigation variant is configured, All documentation in the header returns to the docs index, sections without a landing page link to their first available page, and empty sections are omitted. Configure nav.docs.tabs for your own section labels and destinations; the sidebar does not repeat the header’s section selector.
The longest matching path owns each article, respecting whole path segments. In this example, /docs/platform/api/check belongs to platform/api, while the parent platform sidebar excludes that API section. /docs/platform/apiary still belongs to platform. In the current release, local /docs/ destinations in nav.docs.products[].tabs automatically supply these scopes; you do not need to repeat their paths in tabSections.
In the current release, a scoped sidebar removes the folder hierarchy through the selected section. For platform/api, its pages and child groups appear directly, without enclosing Platform or API groups. A visible platform/api/index.mdx supplies an ordinary top-level Overview link to /docs/platform/api, marked as the current page on that landing page. If the index is missing or hidden from the sidebar, no Overview link is added. Every remaining page keeps its full destination URL, so selecting Overview or an article stays within the section on desktop and mobile.
Keep sidebar metadata keyed by the complete content-folder path: for example, docs.sidebar.meta.platform/api/reference still controls the Reference group inside the API section. Scoping preserves metadata labels, ordering, and explicit collapsed settings. sidebar.defaultOpenLevel continues to use the original folder depth before enclosing folders are removed; scoping does not automatically expand groups that were deeper in the full hierarchy. Without a selected scope, the sidebar hierarchy is unchanged.
The shared layout includes a keyboard-accessible navigation menu on small screens, a collapsible On this page list, and search at every screen size. Search indexes article content, excluding navigation and breadcrumbs.
Custom routes can render SectionSwitcher from @publier/shell/components. Pass sections as an array of { label, href } and currentPath as the current URL pathname. Its links support arrow keys and Escape.
Search
| Field | Type | Default | Description |
|---|---|---|---|
search.enabled | boolean | true | Show the header search trigger; does not disable the dialog or keyboard handler |
The shortcut defaults to Cmd/Ctrl + K; set search.hotkey to a single letter or digit to change it (see Search). To disable the built-in dialog and its keyboard handler, use the existing docsShell({ search: false }) integration option. That option does not hide the header trigger; the YAML setting controls that separately. See Search.
LLMs
| Field | Type | Default | Description |
|---|---|---|---|
llms.enabled | boolean | false | Generate /llms.txt at build time |
llms.full | boolean | false | With enabled: true, generate per-page Markdown and /llms-full.txt from rendered HTML |
llms.collections | string[] | [] | URL groups to include; omit for the whole site, or use [pages, docs] for the homepage and docs |
Groups use the first URL path segment; the homepage is pages. These groups are independent of Astro content collections. Error routes and noindex pages are excluded. The summary comes from site.description. Tools that support the llms.txt convention can use this index; it does not guarantee indexing or citations. See AI features for current capabilities.
Snippets
| Field | Type | Default | Description |
|---|---|---|---|
snippets.directory | string | 'content/snippets' | Directory of reusable MDX fragments |
See the Snippets guide for usage.
Logo and favicon
site: logo: light: /logo-light.svg # shown in light mode dark: /logo-dark.svg # shown in dark mode favicon: /favicon.icoPaths are relative to public/.
Footer links
site.footerLinks puts links in the footer of every page, including the docs and blog pages the shell renders itself, above the site.footer text. It needs @publier/shell 0.15.0 or later.
site: footer: "© 2026 Acme." footerLinks: - { label: Privacy, href: /privacy-policy } - { label: Terms, href: /terms-of-service }Each entry has a label and an href, and links render in the order listed. An href is a local path, a fragment, or an https:, http:, mailto: or tel: URL. Any other scheme, a missing label or href, or an unknown key fails the build and names the entry. A footer with links and no site.footer text is valid.
Edit links
There is no editLink.baseUrl configuration in the current framework. Add an ordinary source link to your page content or a custom layout when readers need to propose edits.
Pages
The pages: YAML flags are not consumed by the current shell’s route planner. They neither create nor suppress routes, and do not remove links from navigation, sitemap, search, or feeds.
The shell injects docs, blog, and changelog routes only when the corresponding content directories contain entries. Its existing docsShell({ routes: ... }) integration option controls those default routes, the default 404, and RSS. Company pages come from src/pages/; status and knowledge-base routes are not automatically supplied. See Pages for the supported route controls and current limits.