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:
| File | Is |
|---|---|
docs/index.md | The version home, which every version needs. A number prefix such as 01.index.md is allowed. |
docs/<folder>/index.md | The 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.md | The not-found page. |
docs/_footer.md | The footer: a heading per column, a list of links under each, and a copyright paragraph. |
public/logo.svg, public/logo-dark.svg | The logo before the title, and its dark-theme version. |
public/favicon.svg | The site icon. |
app/components/ | The site's own components, which a page links as @/app/components/<name>.html (see Components). |
app/layouts/default.html | A layout that replaces the Markupress shell (see Layouts). |
app/layouts/home.html | A layout that replaces the home layout (see Home page). |
markupkit.config.ts | MarkupKit 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.