Skip to main content

Configuration

createConfig() takes the values that differ between voraus sites and returns a complete Docusaurus config. Everything else is shared.

docusaurus.config.ts
import { createConfig } from '@voraus/docusaurus-theme'

export default createConfig({
title: 'voraus.example',
projectName: 'voraus-example',
})

The result is an ordinary Docusaurus config, so every Docusaurus command works unchanged. The full option type is exported as VorausSiteOptions, so your editor completes and checks it.

Options

OptionTypeDefaultDescription
titlestringrequiredSite title, shown in the navbar and the browser tab.
projectNamestringrequiredRepository name, and the site's vdoc path segment.
versionstring'dev'Release version, the second vdoc path segment. Pass your package.json version.
urlstringthe vdoc docs hostOverride only for sites not served from https://docs.vorausrobotik.com.
baseUrlstringthe vdoc layoutOverride only to opt out of /static/projects/<project>/<version>/.
taglinestringundefinedShort subtitle used in metadata.
faviconstring'img/favicon.ico'Path relative to the site's static directory.
organizationNamestring'vorausrobotik'GitHub org that owns the site repository.
docsPresetOptions['docs']{}Forwarded to plugin-content-docs. {} autogenerates the sidebar. false disables docs.
blogPresetOptions['blog']falseForwarded to plugin-content-blog.
pagesPresetOptions['pages']falseForwarded to plugin-content-pages.
customCssstring | string[][]Your stylesheets. Loaded after the theme, so they win.
navbarItemsNavbarItem[][]Appended after the shared navbar defaults.
iconLinksVorausIconLink[][]Links shown as a mark, appended after navbarItems. See Icon links.
searchfalse | object{}Offline search options. false removes the search bar.
themeConfigPartial<ThemeConfig>{}Deep-merged onto the shared themeConfig.
configPartial<Config>{}Deep-merged onto the finished config. Escape hatch for anything above.

What the shared defaults set

SettingValue
onBrokenLinksthrow, see Strict builds
onBrokenAnchorsthrow
markdown.mermaidtrue, fenced mermaid blocks become diagrams
future.v4true, the whole fleet migrates to Docusaurus v4 together
i18nEnglish only
colorModelight default, respects prefers-color-scheme
blog, pagesdisabled

Overriding a default

themeConfig and config are deep-merged, but arrays replace rather than merge:

export default createConfig({
title: 'voraus.example',
projectName: 'voraus-example',
themeConfig: {
docs: { sidebar: { hideable: true } },
prism: { additionalLanguages: ['python', 'bash'] },
},
config: {
plugins: ['@docusaurus/plugin-ideal-image'],
},
})

Setting themeConfig.navbar.items would therefore discard the shared navbar. Use navbarItems to append instead, as shown in Customizing.

Docs at the site root

By default the docs sit under a /docs/ segment. To drop it:

export default createConfig({
title: 'voraus.example',
projectName: 'voraus-example',
version: pkg.version,
docs: { routeBasePath: '/', sidebarPath: './sidebars.ts' },
})

This is routeBasePath, not baseUrl. baseUrl is where the site is deployed; routeBasePath is where the docs plugin mounts inside it.

It mounts the docs at the root but does not create a page at the root. Give your landing document slug: / in its front matter, or the build fails its own link check.