Перейти к содержанию

Mkdocs Start

MkDocs Material Starter Kit. Deploy documentation to hosting platforms (Netlify, GitHub Pages).

Blog Post Ru lang.


Create docs

Create Netlify project & Github repo. Method 1. Demo.

  • Open url.
  • git clone https://github.com/[GITHUB_USER]/[GITHUB_REPO]/.
  • cd [GITHUB_REPO].

Configure

Edit mkdocs.yml.

site_url: https://creio-mkdocs.netlify.com/
repo_name: creio/creio-mkdocs
repo_url: https://github.com/creio/creio-mkdocs

Mkdocs local

OS Arch Linux, virtualenv python.

pacman -S python-pip
pip install --upgrade --user virtualenv
virtualenv ve
source ve/bin/activate
pip install -r requirements.txt

Bash script helper.

./task.sh

Create symlink README.mddocs/index.md.

./task.sh -l

Netlify config

File netlify.toml custom build command.

Github pages

Github pages, no Netlify. Method 2. Demo.

Build & push.

./task.sh -d

Open url https://github.com/[GITHUB_USER]/[GITHUB_REPO]/settings. GitHub Pages - Source, gh-pages branch.

Site url: https://[GITHUB_USER]/github.io/[GITHUB_REPO]

Исходный код

README.md