Local Run
How to run Notepub locally for development and build flows.
This page covers a quick local run workflow before deploy.
Notepub binary
You need the notepub binary for build/render.
For recipe repositories, use one of these options:
- Download release binary
notepubinto project root (usually./notepub). or - Install via Go (
go install ...) and runnotepubfromPATH. or - Run without a separate binary using
go run.
Examples below use NOTEPUB_BIN.
Where to run commands
Run commands from the root of your site repository, where you have:
config.yamlrules.yamlcontent/
Example:
cd /path/to/your-site-repo
Minimal commands
Index:
NOTEPUB_BIN=./notepub
$NOTEPUB_BIN index --config ./config.yaml --rules ./rules.yaml
Serve:
$NOTEPUB_BIN serve --config ./config.yaml --rules ./rules.yaml
Build:
$NOTEPUB_BIN build --config ./config.yaml --rules ./rules.yaml --dist ./dist
When to use
index- prepareresolve.jsonand artifacts.serve- preview site locally in server mode.build- produce static output indist/.
For full flags reference, see Commands.