A Simple Image with mkdocs and mkdocs-publisher
2.2K
This repository contains a Dockerized version of MkDocs, a static site generator for project documentation, and the mkdocs-publisher plugin for enhanced publishing capabilities. The Docker image is designed to simplify hosting and serving MkDocs-based documentation sites with automatic rebuilds and Nginx for serving the generated content.
amd64 and arm64.Pull the pre-built image from Docker Hub:
docker pull alamellama/mkdocs-publisher:latest
To build the image locally, clone this repository and run:
docker build -t mkdocs-publisher .
Serve your MkDocs site with the following command:
docker run -p 80:80 -v $(pwd):/app alamellama/mkdocs-publisher
mkdocs.yml and docs/) to /app in the container.http://<your-server-ip> (or http://localhost if running locally).The container watches for changes in your project directory (excluding the /app/site folder) and rebuilds the MkDocs site whenever a change is detected. This is done using inotifywait with a debounce to prevent continuous rebuilds during rapid file changes.
Ensure your project is structured like this:
.
āāā docs/
ā āāā index.md
ā āāā page1.md
āāā mkdocs.yml
site_name: Llama's Notes
site_url: "https://notes.somecooldomain.au/"
use_directory_urls: false
theme:
name: material
icon:
repo: fontawesome/brands/github
palette:
# Palette toggle for light mode
- media: "(prefers-color-scheme: light)"
scheme: default
primary: deep-purple
toggle:
icon: material/brightness-7
name: Switch to dark mode
# Palette toggle for dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
primary: deep-purple
toggle:
icon: material/brightness-4
name: Switch to light mode
plugins:
- pub-obsidian
markdown_extensions:
- admonition
- attr_list
- md_in_html
- pymdownx.details
- pymdownx.superfences
The Docker image is built with support for multiple platforms:
linux/amd64linux/arm64Contributions are welcome! If you encounter any issues or want to suggest features, feel free to open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSEā file for more details.
For more information, visit the MkDocs official websiteā and MkDocs Publisherā
Happy documenting! āļø
Content type
Image
Digest
sha256:99be49cf5ā¦
Size
47.3 MB
Last updated
over 1 year ago
docker pull alamellama/mkdocs-publisher