Skip to content

assetsPlugin

Copies the theme’s assets folder into the output, at the path the bundled stylesheets point to. Today that folder holds the KaTeX font files katex.css loads, so the plugin is only needed with math.

theme.assetsPlugin();

Options

None.

Example

The three pieces math needs, in .staticbolt.ts and docs.css:

plugins.coreMarkdownPlugin({
remarkPlugins: [remarkMath],
rehypePlugins: [[rehypeKatex, { output: "mathml" }]],
}),
theme.assetsPlugin(),
@import url("@staticbolt/docs/styles/katex.css");

Notes

  • Runs in the write stage, production only.
  • Fonts are only fetched by pages that render math, the stylesheet alone costs nothing.