Settings
List of built-in settings. (You can create your own settings.)
Basic
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 code301
).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.extends
: Install Overview > Extensions.
HTML
Head
: Add arbitrary<head>
tags.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.lang
: Set the page's language (<html lang>
).htmlAttributes
: Add tag attributes such as<html class="dark">
.bodyAttributes
: Add tag attributes such as<body class="dark">
.bodyHtmlBegin
: Insert HTML at the beginning of<body>
.bodyHtmlEnd
: Insert HTML at the end of<body>
.
You create your own custom HTML settings, see Guides >
<head>
tags > Custom settings.
Advanced
Most users don't need to know about these settings.
meta
: Create new hooks or settings, or modify existing ones.passToClient
:string[]
Determines whatpageContext
values are sent to the client-side.clientRouting
:boolean
Enable Client Routing.hydrationCanBeAborted
:boolean
Whether your UI framework allows the hydration to be aborted.disableAutoFullBuild
: Disable automatic chaining of build steps.trailingSlash
: Whether URLs should end with a trailing slash.disableUrlNormalization
: Disable automatic URL normalization.reactStrictMode
:vike-react
Whether to use React's<StrictMode>
.clientHooks
:boolean
Whether hooks are loaded on the client-side.filesystemRoutingRoot
: URL root for Filesystem Routing.injectScriptsAt
: Where scripts are injected in the HTML.