Skip to content

Instructions

This is the initial blank slate.

Steps so far

Basic install

Install mkdocs-material as a dev dependency.

pipenv install --dev mkdocs-material

Bootstrap the project with mkdocs new.

pipenv run mkdocs new .

Initial configuration is done in the mkdocs.yml file.

Add material theme

Enable the Material theme in the mkdocs.yml file.

theme:
  name: material

Add SuperFences

markdown_extensions:
  - pymdownx.superfences

Add git revision date

pipenv install --dev mkdocs-git-revision-date-plugin
plugins:
  - git-revision-date

Deploying github pages

Ensure github actions has read and write access to the repository.

Github actions permissions Github actions permissions

Add the following .github/workflows/pages.yml to the repository

name: ci 
on:
  push:
    branches:
      - main
    paths:
      - '.github/workflows/pages.yml'
      - 'docs/*'
      - 'mkdocs.yml'
      - 'Pipfile.lock'
      - 'Makefile'

jobs:
  deploy:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v3

    - name: Set up Python 3.9
      uses: actions/setup-python@v3
      with:
        python-version: "3.9"

    - name: Install latest pipenv
      run: pip install -U pip pipenv

    - name: Install mkdocs dependencies
      run: make dev

    - name: Deploy to github pages
      run: make deploy

Once the workflow is deployed, update github pages to point to the new gh-pages branch

Github pages Github pages


Last update: 2022-05-10