See this page on github pages at: https://edgarroman.github.io/techtalk-mkdocs/
- Ability to host any static files in a github repository.
- Similar to S3 but free
- Several Options:
- Use
gh-pages
branch - Use
master
branch - Use
docs
directory onmaster
branch
- Use
- URL format is:
https://<username or organization>.github.io/<project name>
- Allowed to have custom domain easily - just point your DNS
- Can put stuff at
by creating a project named after the organization or user.
- Defacto Standard
- But not really standardized (e.g. Github-flavored Markdown)
- Learn it
- Quick Examples
- https://jbt.github.io/markdown-editor/
- https://stackedit.io/editor
- Macdown
- VSCode
- Plugins for Sublime, etc
- Infinite others
- Write Markdown source, compile/build it, upload HTML
- Write Markdown source, upload raw, have JS render on the fly
- Some critical of this approach
- Only found one realistic framework that is a bit old: Flatdoc * https://edgarroman.github.io/doctest-flatdoc/
Will be focusing on option 1 above
One-time setup of github pages (Easiest to create the gh-pages
branch. Autodetected by github). Then:
- Write source material in markdown
- Check source material into the
master
branch - Run a build on the source material to render material
- Check in rendered material into the
gh-pages
branch - Rinse, Repeat
If you're really cool, then you will have a CI system do your build for you. But if you're cheap (like me), just do it manually (Lazy! SAD!)
Tons Pretty good list: https://www.staticgen.com/
Pretty much any language you want: Python, .NET, Go, PHP - even non languages like Javascript!
- Some are better for blogs: Have fancy tag clouds and 'most recent' widgets
- Some are just straight up pages: More general documentation
- Some are focused on API: But swagger would probably be a better choice
- General Static Page (non-blog)
- Minimal install overhead (e.g. only Python)
- Good Documentation
- Reasonably good looking output
- Simple
Others:
- Cactus - Bad docs
- Sphinx - Complicated
- Gitbook - Corporate pig dogs
- Jekyll - Don't know how to use ruby
- Hyde - Terrible documentation
- Create Repo
- Install mkdocs
virtualenv ve source ve/bin/activate pip install mkdocs
- Init the mkdocs project
mkdocs new .
- Customize mkdocs.yml
site_name: Mkdocs overview pages: - Home: 'README.md'
- Add / Edit pages
- Run local server
mkdocs serve
- Edit and revise
- Commit and push source to github
- Deploy to gh-pages
mkdocs gh-deploy
- Profit
site_name: Mkdocs overview
pages:
- Home: 'README.md'
theme: readthedocs
-
Any pyMdown extensions
pip install pymdown-extensions
-
http://facelessuser.github.io/pymdown-extensions/
site_name: Mkdocs overview pages: - Home: 'README.md' markdown_extensions: - pymdownx.superfences