Project structure

A site needs no configuration. docs/index.md is a complete site, and markupress dev serves it. Files in known places shape the rest:

FileIs
docs/index.mdThe version home, which every version needs. A number prefix such as 01.index.md is allowed.
docs/<folder>/index.mdThe folder's page and its metadata (see Folders). Each top-level folder with an index page is a section: a top navigation link with its own sidebar.
docs/404.mdThe not-found page.
docs/_footer.mdThe footer: a heading per column, a list of links under each, and a copyright paragraph.
public/logo.svg, public/logo-dark.svgThe logo before the title, and its dark-theme version.
public/favicon.svgThe site icon.
app/components/The site's own components, which a page links as @/app/components/<name>.html (see Components).
app/layouts/default.htmlA layout that replaces the Markupress shell (see Layouts).
app/layouts/home.htmlA layout that replaces the home layout (see Home page).
markupkit.config.tsMarkupKit options and plugins.
versions/<id>/A recorded version, written by markupress snapshot (see Versions).

Pages and their front matter come next, and the configuration comes last: markupress.config.ts, or plain JSON data in markupress.config.json, for the title, the base path and a few more settings (see Configuration).

The markupress command and these APIs also load the site's markupkit.config.ts (or .js) with MarkupKit's loadConfig, and add markupress() after its plugins, so MarkupKit plugins and options compose with Markupress:

// markupkit.config.ts
import { defineConfig } from '@threadlabs/markupkit';
import { feed } from './plugins/feed.js';

export default defineConfig({ plugins: [feed()], redirects: { '/start/': '/guide/install/' } });

base and outDir from the Markupress configuration or the command line win over the MarkupKit config's; without either, they are / and site. markupress() includes the markdown() plugin, so the MarkupKit config lists neither.

Edit this page

Last updated