Default Theme

The default theme (themes/default in the Methanol repo) provides the baseline layout, sidebar, and styling.

Features

Language Selector

The selector appears when Methanol finds frontmatter.lang on directory index.mdx pages (including the root index). The display label comes from lang, and the active selection is derived from ctx.language.

Search (Pagefind)

Enable search by setting pagefind: true in config and installing Pagefind.

npm i -D pagefind

When pagefind is enabled, Methanol runs the Pagefind CLI after build and writes output to dist/pagefind.

Starry Night Styles

The theme ships Starry Night styles in its CSS.

The default theme can show an “Edit this page” link in the footer.

Set site.repoBase to the base URL of your content folder in a git hosting UI:

// methanol.config.js
export default () => ({
	site: {
		repoBase: 'https://github.com/OWNER/REPO/edit/main/pages/'
	}
})

If a page has sourceURL in frontmatter, it overrides site.repoBase for that page.