Skip to content

About iBug Wiki

This wiki is powered by Material for MkDocs, the perfect theme for a documentation site.

The source code of this wiki is hosted on GitHub and not yet public. The repository can be seen on the top-right corner.

The public site is built and hosted on Cloudflare Pages. For simple builds like a single mkdocs build command, Cloudflare Pages is a better choice over GitHub Actions, which is more suitable for more complex build pipelines. All I need to do is link my GitHub repository and select "MkDocs" from "Framework presets", and it starts building for my every push to the repository.

For my own convenience of previewing, my local copy is stored on my development server, and I launch an mkdocs serve Docker container from squidfunk/mkdocs-material using the following Docker Compose setup:

docker-compose.yml
version: "2.4"

name: ibug-wiki

services:
  ibug-wiki:
    image: squidfunk/mkdocs-material:latest
    container_name: ibug-wiki
    restart: always
    stdin_open: true
    tty: true
    user: "1000:1000"
    cpus: 1
    cpuset: 0,1
    mem_limit: 128m
    volumes:
      - "~/proj/wiki:/docs:ro"
    networks:
      default:
        ipv4_address: 192.168.2.10

networks:
  default:
    name: ibug0
    external: true

Then I have Nginx in front to handle SSL, and my preview site is available at https://wiki.s.ibugone.com.

Thanks to how MkDocs is engineered, every local file modification causes MkDocs to rebuild the site and refresh my page. For me this suffices as a "live preview", with the only difference from instant WYSIWYG being having to save the file (Ctrl-S) before previews are ready.