Skip to content

MkDocs on Ubuntu

0. Intro

MkDocs is a opensource framework for static pages, which is developed with python.

1. Install Dependencies

Install basic dependencies:

sudo apt install -y --no-install-recommends git git-lfs python3 pip 

If you wish to enable social plugin:

sudo apt install -y --no-install-recommends libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev pngquant

2. Install MkDocs and Dependencies

pip install pip install --no-cache-dir --break-system-packages \
  mkdocs-material \
  mkdocs-git-revision-date-localized-plugin \
  mkdocs-git-authors-plugin \
  mkdocs-rss-plugin \
  mkdocs-material[imaging]

3. Configure mkdocs.yml

Configure this config file.

For detail: Material for MkDocs

4. Write Blog

Create *.md in folder.

5. Build and Deploy

Build your blog with command:

mkdocs build

Deploy your blog with command:

mkdocs gp-deploy