Installation and your first site
Install M-Press and build a documentation site in a few commands.
M-Press requires only the mpress executable at runtime.
Build from source
Until packaged release binaries are published, install from the Go module:
go install github.com/leaanthony/mpress/cmd/mpress@latest
You can also build a repository checkout:
git clone https://github.com/leaanthony/mpress.git
cd mpress
go build -o mpress ./cmd/mpress
Create a site
mpress init my-docs
cd my-docs
mpress dev
Open http://localhost:3000. The starter contains:
- my-docs
- mpress.yamlSite configuration
- content
- index.mdHome page
- staticImages and other static files
Edit content/index.md and save it. The development server rebuilds the site
and refreshes connected browser tabs.
Build for release
mpress build --strict
mpress check
--strict rejects duplicate routes, unsupported components, and other error
diagnostics. mpress check verifies local links, fragments, images, scripts,
and stylesheets in the generated HTML.
The default output directory is site/. It can be served directly:
python3 -m http.server --directory site 8000
Use M-Press inside an existing Go checkout
M-Press itself uses this approach. Put mpress.yaml at the repository root,
set build.contentDir to your documentation directory, and run:
go run ./cmd/mpress build --strict
go run ./cmd/mpress check