FrontmatterConfiguration
Controls which parts of the frontmatter block SvelTeX turns into generated code.
Every .sveltex file may begin with a frontmatter block — metadata delimited by --- (YAML), +++ (TOML), or a ----delimited block whose opening fence reads ---json. By default, SvelTeX uses that metadata in three independent ways; each can be switched off here.
Switching a step off never stops the frontmatter block from being parsed and removed from the rendered output, and never stops the parsed values from being handed to your markdown and math transformers — it only suppresses the corresponding generated code.
See: The frontmatter option, which accepts this object (or a plain boolean).
Properties
head? boolean | undefinedtypes/SveltexConfiguration.ts:174
Whether to add a <svelte:head> block built from the frontmatter, containing — wherever the corresponding keys are present — a <title>, <meta>, <link>, <base>, and/or <noscript> element.
Set this to false to keep full control over your document's <head>. The frontmatter values remain available through the other frontmatter steps — so you can, for instance, read title from the metadata export and build a <title> that appends your site's name to it.
Default true
imports? boolean | undefinedtypes/SveltexConfiguration.ts:194
Whether to honor the special imports frontmatter key, which lets a document declare import statements from within its frontmatter. When enabled, those import statements are added to the instance script (<script>).
Default true
metadata? boolean | undefinedtypes/SveltexConfiguration.ts:184
Whether to add an export const metadata = { ... } statement to the module script (<script module>), exposing the whole frontmatter as a single object. This is what lets a SvelteKit load function — or any module that imports the page — read the page's frontmatter.
Default true