Opinionated MDX-first static site generator powered by rEFui + Vite.
For full documentation and examples, visit Methanol Docs.
# build
npx methanol build
# dev server
npx methanol dev
# preview the production build
npx methanol serveFrom this repo, use node bin/methanol.js [dev|build|serve].
Methanol expects a project like this:
pages/ # .mdx pages (file-based routing)
components/ # JSX/TSX components used by MDX
public/ # static assets copied/served as-is
dist/ # build output
Create methanol.config.{js,mjs,cjs,ts,jsx,tsx,mts,cts} and export a function:
export default () => ({
// optional: search (Pagefind)
pagefind: {
enabled: true
},
// optional: code highlighting (Starry Night, default: enabled)
starryNight: false,
// optional: worker thread count (0 = auto)
jobs: 0,
// optional: pwa support
pwa: true,
// optional: site metadata
site: {
base: '/docs/'
},
// optional: theme sources
theme: {
sources: {
'/.my-theme': './sources'
}
}
})Methanol includes built-in themes (default, blog). Use --theme <name> or set theme: '<name>' in config. For local themes inside your project, import the theme entry in methanol.config.* and pass the theme object/factory.
methanol previewis an alias formethanol serve