Files
mkdocs-quickstart/docs/setup_and_run.md
2020-05-02 23:24:48 +02:00

756 B

Setup and run

How to setup and run a docs site locally

Note: If using VS Code, you can use the command palette instead to run the configured tasks - these are setup in .vscode/tasks.json.

Install

Make sure you have Python installed - ideally a recent Python 3 version.

Install in a virtual environment.

pip install mkdocs

Server docs locally

This will build the docs in memory (not to disk) and serve an auto-reloading server.

mkdocs serve

Open URL:

Build docs

Build docs site to site directory. Useful for production build or simulating that locally.

mkdocs build

Add this flag to remove stale files when building.

mkdocs build --clean