Contribute

Edit this documentation

Translate the documentation or open the complete project on your computer.

Nothing is published until you choose to submit your work.

Interactive components

Progressive enhancement without a JavaScript framework.

Interactive components are static HTML first. The default theme adds a small, dependency-free script for state, network requests, and presentation.

Tutorials

Publish a site

0/3 completed
1Check the content

Run mpress check.

2Build strictly

Run mpress build --strict.

3Deploy the output

Upload the generated site/ directory.

Source
md
@tutorial{title="Publish a site"}
### Check the content
Run `mpress check`.

### Build strictly
Run `mpress build --strict`.

### Deploy the output
Upload the generated `site/` directory.
@end

Progress is stored locally and the reset button clears it.

Audience filtering

The selector is added automatically when a page contains audience blocks.

Developers can extend the Markdown processing pipeline in Go.

Writers only need Markdown, HTML, and the preview command.

Source
md
@audience{role="developer"}
Developers can extend the Markdown processing pipeline in Go.
@end

@audience{role="writer"}
Writers only need Markdown, HTML, and the preview command.
@end

Conditional content

Conditional blocks read a URL parameter, then remember it locally. Visit this page with ?framework=go to select the second block.

This is the default, framework-neutral guidance.

This guidance is selected for Go users.

Source
md
@if{param="framework" value="plain" default="true"}
This is the default, framework-neutral guidance.
@end

@if{param="framework" value="go"}
This guidance is selected for Go users.
@end

Reactive values

Project seats:

Source
md
@input{name="projects" type="range" min="1" max="20" value="4" label="Projects"}
@end

@input{name="seats" type="number" value="3" label="Editors"}
@end

@computed{expr="projects * seats" deps="projects,seats" label="Project seats" format="%d"}
@end

API playground

The playground sends a real browser request only when the reader presses the button. This example targets the local preview server and is safe to inspect.

GET /search-index.json

Inspect the generated search index.

Headers
Source
md
@api-playground{method="GET" path="/search-index.json" baseUrl="http://127.0.0.1:4174"}
Inspect the generated search index.
@end

Variants

@variant{name="react"} is resolved during the build rather than in the browser. Set the active variant in the build configuration to publish one set of product-specific content from a shared source.

Last updated: