github.com/muhammadn/cortex@v1.9.1-0.20220510110439-46bb7000d03d/docs/contributing/how-to-run-website-locally.md (about) 1 --- 2 title: "How to run the website locally" 3 linkTitle: "How to run the website locally" 4 weight: 3 5 slug: how-to-run-the-website-locally 6 --- 7 8 The Cortex documentation is compiled into a website published at [cortexmetrics.io](https://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. 9 10 11 ## Initial setup 12 13 The following initial setup is required only once: 14 15 1. Install [Hugo](https://gohugo.io/) `v0.72.0` (**extended** version) 16 2. Install [Node.js](https://nodejs.org/en/) `v14` or above (alternatively via [`nvm`](https://github.com/nvm-sh/nvm)) 17 3. Install required Node modules with: 18 ``` 19 cd website && npm install && cd - 20 ``` 21 4. Run `make BUILD_IN_CONTAINER=false web-build` 22 23 24 ## Run it 25 26 Once the initial setup is completed, you can run the website with the following command. The local website will run at [`http://localhost:1313/`](http://localhost:1313/) 27 28 ```bash 29 # Keep this running 30 make web-serve 31 ``` 32 33 Whenever you change the content of `docs/` or markdown files in the repository root `/` you should run: 34 35 ```bash 36 make BUILD_IN_CONTAINER=false web-pre 37 ``` 38 39 Whenever you change the config file or CLI flags in the Cortex code, you should rebuild the config file reference documentation: 40 41 ```bash 42 make BUILD_IN_CONTAINER=false doc web-pre 43 ```