Skip to main content

Theme Config Reference

Theme config allows you to customize the default theme. Define theme config via the themeConfig option in your config file.
These options only apply to the default theme. Custom themes may have different configurations.

Branding

Logo file to display in the navbar, right before the site title. Accepts a path string or an object to set different logos for light/dark mode.
Overrides the link of the site logo. Useful if you want the logo to link to an external site.

siteTitle

string | false
Customizes the site title in navbar. If undefined, config.title will be used. Set to false to disable the title.Useful when your logo already contains the site title text.
NavItem[]
Configuration for the navigation menu in the navbar.
Sidebar
Configuration for the sidebar menu. Can be a simple array or an object with multiple sidebars for different sections.

Content Layout

aside

boolean | 'left'
default:"true"
Controls the rendering of the aside (table of contents) container.
  • false: No aside
  • true: Aside to the right
  • 'left': Aside to the left
Can be overridden per page via frontmatter.

outline

Outline | Outline['level'] | false
default:"2"
Configure the outline (table of contents) displayed in the aside.Can be overridden per page via frontmatter (level only).

outlineTitle

string
default:"On this page"
Deprecated: Use outline.label instead.Custom title for the outline in the aside component.
Social account links with icons displayed at the end of the nav bar. Supports any icon from simple-icons or custom SVG.

externalLinkIcon

Show an external link icon next to external links in markdown content.
Footer configuration. Only displayed when the page doesn’t contain a sidebar.Can be overridden per page via frontmatter.

docFooter

Customize the text appearing in the previous/next page navigation. Can disable prev/next links by setting to false.
Display a link to edit the page on Git management services (GitHub, GitLab, etc.).Can be overridden per page via frontmatter.

Last Updated

lastUpdated

LastUpdatedOptions
Customize the last updated text and date format.

lastUpdatedText

string
default:"Last updated"
Deprecated: Use lastUpdated.text instead.Custom text for the last updated label.

search

Search configuration. Supports local search or Algolia DocSearch.

Advertising

carbonAds

CarbonAdsOptions
Display Carbon Ads on your site.

Internationalization

i18nRouting

boolean
default:"true"
Changing locale to say zh will change the URL from /foo (or /en/foo/) to /zh/foo. Set to false to disable this behavior.

langMenuLabel

string
default:"Change language"
Custom aria-label for the language menu button.

Accessibility Labels

These options are only displayed in mobile view or for screen readers.

darkModeSwitchLabel

string
default:"Appearance"
Label for the dark mode switch (mobile view only).

lightModeSwitchTitle

string
default:"Switch to light theme"
Hover title for the light mode switch.

darkModeSwitchTitle

string
default:"Switch to dark theme"
Hover title for the dark mode switch.

sidebarMenuLabel

string
default:"Menu"
Label for the sidebar menu (mobile view only).

returnToTopLabel

string
default:"Return to top"
Label for the return to top button (mobile view only).

skipToContentLabel

string
default:"Skip to content"
Label for the skip to content link (keyboard navigation).

404 Page

notFound

NotFoundOptions
Customize the 404 page text and behavior.