MkDocs

Based on the official guide.

Install

Just do pip install mkdocs and then mkdocs new projectName and cd projectName, off you go.

Local Env

Test/develop locally, and run mkdocs serve to see live reloading at http://localhost:8000.

Deployment

Add a CNAME file matching the domain/subdomain: ./docs/CNAME:

wiki.zcyph.cc

Run mkdocs build from the mkdocs root dir after editing is complete.

It's a static site, so it needs to be served by a webserver. In this case, I'll use NGINX:

services:
  mkdocs:
    image: nginx
    container_name: "mkdocs"
    restart: always
    volumes:
      - ./site:/usr/share/nginx/html:ro
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.mkdocs.rule=Host(`wiki.zcyph.cc`)"
      - "traefik.http.routers.mkdocs.entrypoints=https"
      - "traefik.http.routers.mkdocs.tls.certresolver=cloudflare"
      - "traefik.http.services.mkdocs.loadbalancer.server.port=80"
      - "traefik.docker.network=traefik"
    networks:
      - "traefik"

networks:
  traefik:
    external: true

Git add, commit & push - DroneCI will automatically deploy.

If not using any CI/CD, git pull from the server.