Skip to content

mkdocs

These are notes on mkdocs from deploying a mkdocs site for my notes.

mkdocs is a Python-based tool used to build static websites, geared towards technical documentation.

Setting up MkDocs

MKDOCS_DIR='~/tech-notes'
1. If hosting locally, use a virtual environment.
sudo apt-get install python3.10-venv  # to get the venv module
sudo apt-get install python3.10-venv --fix-missing  # if install doesn't work
python3 -m venv venv
. venv/bin/activate

  1. Install mkdocs and a theme for mkdocs.

    pip install mkdocs mkdocs-material
    

  2. Initialize the mkdocs project.

    mkdocs new tech-notes
    cd tech-notes
    

  3. Copy the contents of the notes into the

MkDocs Project Structure

In the root of the repo, you need a docs/ directory.
You also need a mkdocs.yml file in the repo root.

The directory structure of my notes directory is fine for mkdocs, but it all needs to be in the docs/ directory instead of the root.