Skip to content

MKDocs and Material update

Back in 2021, I talked about how I moved my website away from Wordpress and onto a static-generated site using mkdocs. A few things have changed since then.

Theme update

The first major update was the change to the material theme. It is a very powerful theme with lots of built-in features. One cool thing I liked was the supported option to add a blog. Since I do write and share information from time to time, a blog is the way to go, and using this theme really helped. It also looks cool, with lots of options to customise.

RSS

Call me old fashioned, but I like the idea of having an RSS feed. Sadly there isn't one out of the box, so I had to add the additional plugin in.

Reworked the content a bit

Each of the markdown files for the blog had to be tweaked to allow the blog pluging to correctly render it. This took a bit of time (about a day or so). I also have the Grammarly extension loaded into VSCode, so doing on-the-fly editing is also quite handy.

Blog on the front page

This annoyed me - I couldn't get the blog to display on the front page, it was in a seperate sub directory. Not anymore. I found an option in material that allows me to move the blog to the front page. The only downside is that all of my permalinks for the blog pages have now changed.

Added Google Analytics

I do want to know how many people are visiting the site, at least to get an idea, and Google Analytics can help with that. Material has built-in support for Google Analytics - you just need to register the site, and add the id into the mkdocs.yml file.

Overall Architecture

The overall architecture is still pretty much the same

  • Domain massyn.net registered with Route53 on AWS
  • Cloudfront distribution serving massyn.net configured to an S3 origin with TLS certificate
  • S3 bucket is encrypted with permissions configured to only allow Cloudfront to access it
  • All code stored in Github.
  • Github Action is configured to automatically generate all HTML files, and upload to the S3 bucket
  • Github Action is configured to invalidate the CloudFront cache.