How to Setup a Blog
Install requirements / TLDR
sudo apt update
sudo apt install mkdocs
pip install mkdocs-material mkdocs-blogging-plugin
A Journey
So the first thing you might do is run
mkdocs serve
I was first greeted by this error:
oli@pop-os:~/Documents/blog$ mkdocs serve
Command 'mkdocs' not found, but can be installed with:
sudo apt install mkdocs
Nice it even has the command to install it. So I ran that and got this error:
oli@pop-os:~/Documents/blog$ mkdocs serve
INFO - Building documentation...
ERROR - Config value: 'theme'. Error: Unrecognised theme name: 'material'. The available installed themes are: mkdocs, readthedocs
ERROR - Config value: 'markdown_extensions'. Error: Failed loading extension "pymdownx.arithmatex".
ERROR - Config value: 'plugins'. Error: The "blogging" plugin is not installed
Aborted with 3 Configuration Errors!
So the procedure is now to always start with the first error, as sometimes later errors can just be side effects of earlier errors. The thing to fix is:
Themes
- Install the material theme
The website gives:
pip install mkdocs-material
Trying mkdocs serve
again produces:
ERROR - Config value 'plugins': The "blogging" plugin is not installed
Aborted with 1 Configuration Errors!
Are you feeling lucky? Let's try
pip install mkdocs-blogging-plugin
Oh my God it actually ran succesfully this time (mkdocs serve
).
Thoughts
To be honest this was way easier than the first time I set this up. I'm not sure what went so horribly wrong the first time, but this was actually pretty easy.