How to run the website locally
The Cortex documentation is compiled into a website published at cortexmetrics.io. These instructions explain how to run the website locally, in order to have a quick feedback loop while contributing to the documentation or website styling.
Initial setup
The following initial setup is required only once:
- Install Hugo (extended version)
- Look for value of
HUGO_VERSIONinbuild-image/Dockerfile.
- Look for value of
- Install Node.js
v14or above (alternatively vianvm) - Install required Node modules with:
cd website && npm install && cd - - Install embedmd
v1.0.0:go install github.com/campoy/embedmd@v1.0.0 - Run
make BUILD_IN_CONTAINER=false web-build
Run it
Once the initial setup is completed, you can run the website with the following command. The local website will run at http://localhost:1313/
# Keep this running
make web-serve
Whenever you change the content of docs/ or markdown files in the repository root / you should run:
make BUILD_IN_CONTAINER=false web-pre
Whenever you change the config file or CLI flags in the Cortex code, you should rebuild the config file reference documentation:
make BUILD_IN_CONTAINER=false doc web-pre