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.

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:

sh
go install github.com/leaanthony/mpress/cmd/mpress@latest

Confirm that the executable is available:

sh
mpress version

Create the site

Run these commands:

sh
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. Replace its content with this text:

md
---
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.

Save the file. The development server rebuilds the site and refreshes the page.

Check the release

Stop the development server. Then run these commands:

sh
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.

The M-Press documentation landing page at desktop width

Continue

Last updated: