defineConfig #
Declares the site config in kawapress.config.ts. It only adds types.
Usage #
import { defineConfig } from 'kawapress'
export default defineConfig({
title: 'My Site',
locales: { root: { label: 'English', lang: 'en' } },
})Parameters
The site config.
Site title, shown in the browser tab and used by themes.
<meta name="description"> of pages that set no description in
frontmatter. A locale's own description takes precedence.
URL prefix the site is served under, for example /docs/. Defaults to /.
Folder with the Markdown files, relative to the site root. Defaults to the site root.
Glob patterns, relative to srcDir, of Markdown files that are not pages,
for example snippets/** for a folder of shared parts.
Moves pages to other routes without moving their files, for example
{ 'packages/:pkg/src/:page*': ':pkg/:page*' }.
Folder of static files copied as they are, relative to the site root. Defaults to public.
Tags added to the <head> of every page.
Settings for the theme.
The languages of the site, by key. The root key is the language served at /.
Plugins of the site, run in order.
Extra Vite configuration, merged before plugin vite() hooks run.
A site-local Runtime Plugin module, relative to the site root.
Internal link checking. Defaults to { level: 'error' }; false disables it.
Frontmatter checking: rules for the site's own keys, and whether a page
that breaks a rule fails the build. Defaults to { level: 'error' };
false turns the check off.
Returns The same config.
Full type signature
function defineConfig(config: KawapressConfig): KawapressConfig

Comments