List of built-in settings. (You can create your own settings.)

See also: API > Hooks.

Basics

  • Page: The page's root component.
  • Layout: The page's layout component.
  • Wrapper: Component(s) that wrap the page's root component.
  • route: string | Function The page's route.
  • prerender: Whether to pre-render the page, and pre-rendering settings.
  • client: string Add client code.
  • redirects: Permanent redirections (HTTP status code 301).
  • keepScrollPosition: Whether the page scrolls to the top upon navigation.
  • prefetchStaticAssets: Link prefetching settings.
  • baseAssets: Base URL of server.
  • baseServer: Base URL of static assets.
  • host: Make development/preview server available over LAN and public addresses.
  • port: Change port of development/preview server.
  • mode: Set the mode to run in.
  • extends: Install Overview > Extensions.
  • react: vike-react Options passed to React functions such as createRoot() or hydrateRoot().

HTML shell

Settings that add <head> tags (aka document metadata):

  • title: Set the page's title.
  • description: Set the page's description.
  • image: Set the page's preview image upon URL sharing.
  • viewport: Set the page's viewport size on mobile devices.
  • Head: Add arbitrary <head> tags.

See also: Guides > <head> tags.

You can create your own document metadata settings, see Guides > <head> tags > Custom settings.

Settings that modify the page's HTML shell:

  • lang: Set the page's language (<html lang>).
  • htmlAttributes: Add <html> attributes (e.g. <html class="dark">).
  • bodyAttributes: Add <body> attributes (e.g. <body class="dark">).
  • bodyHtmlBegin: Insert HTML at the beginning of <body>.
  • bodyHtmlEnd: Insert HTML at the end of <body>.

Advanced

Most users don't need to know about these settings.

See also