Build your first M-Press site
Install M-Press, create a site, edit one page, and check the output.
This tutorial gives you a working documentation site. You need Go 1.26.5 or later.
Install M-Press
Run this command:
go install github.com/leaanthony/mpress/cmd/mpress@latest
Confirm that the executable is available:
mpress version
Create the site
Run these commands:
mpress init product-docs
cd product-docs
mpress dev
M-Press shows the local address. Open that address in your browser.
You now have this project:
- product-docs
- mpress.yamlSite configuration
- content
- index.mdHome page
- staticImages and other static files
Change the home page
Open content/index.md. The two source files produce the page shown in the
third tab:
---
title: Product documentation
description: Learn how to use the product.
---
Welcome to the product documentation.
## Install the product
Follow the installation steps for your operating system.site:
title: Product documentation
description: Learn how to use the product.
build:
contentDir: content
staticDir: static
outputDir: site
search:
enabled: true
accessibility:
enabled: trueSave the file. The development server rebuilds the site and refreshes the page.
Check the release
Stop the development server. Then run these commands:
mpress build --strict
mpress check
The site/ directory now contains the static website. The strict build reports
unsupported content and duplicate routes as errors. The check reports broken
local links, fragments, scripts, styles, and images.
You have built and checked your first M-Press site.