Skip to content

Running locally

Requires Docker. The following commands should be entered and run in a terminal program like bash.

Clone the repository

git clone https://github.com/cal-itp/mkdocs-template
cd mkdocs-template

Build the image

docker build -t mkdocs-template -f .devcontainer/Dockerfile .

Run a container

docker run -p 8000:8000 mkdocs-template

The site should be available at http://localhost:8000.

VS Code Devcontainer

This repository comes with a VS Code Devcontainers configuration.

Once you clone the repository locally, simply open it within VS Code, which will prompt you to re-open the repository within the Devcontainer.

Once the Devcontainer is running, bring up the Command Palette and enter:

> Tasks: Run Build Task

To build the site and launch a local server. The site is running on http://localhost at a randomly assigned port; see the VS Code Ports tab for information.