Configuration management with mkdocs and pymdownx.snippets
I believe this is a better way to manage your config files than uploading them to github. With this approach all you need to do is sync your configs file into the config folder within the root of your mkdocs site. They can easily be embedded as snippets in markdown files with appropriate syntax highlighting and contents of these config files also turn up in site search.
Here's an example:
$ mkdocs new vectorspace.xyz
$ cd vectorspace.xyz
$ nvim mkdocs.yml # (1)
$ mkdir configs
$ cp ~/.zshrc configs/
$ nvim docs/index.md # (2)
- look down further for mkdocs.yml
- look down further for index.md
- For
pydownx
extension, you need to installpython-pymdown-extensions
on archlinux
Here I've just added:
... to the end of the autogenerated docs/index.md
file when you first create a site. Check the
results of this by:
see the results for yourself at 127.0.0.1:9000
pydownx is just one of the many awesome extensions developed by github id facelessuser. Check out more at their site: https://facelessuser.github.io/pymdown-extensions/