It took me a while, but I had planned to migrate this blog from Wordpress to a static site for a long time. In fact, writing my posts in ReStructured Text and storing them in source control is how I started out (I had a script to convert RST to a format that I could paste into the Wordpress editor). Now I'm back to that, I switched to Pelican, a static site generator, and I publish the site on my personal server.
I used wordpress.com for more than 15 years on the free tier, but paid 15 dollars a year to connect my domain. For 48 dollars I could get rid of the annoying ads, but that seemed a little bit expensive, especially since I haven't been blogging that much lately.
There's a large number of static site generators. I chose Pelican for several reasons:
- It's written in Python
- It supports content in ReStructured Text or Markdown
- The templates use Jinja 2
- Wordpress import is supported
Even though it's not as popular as other tools, I'm familiar with the technology, which means I can customize or troubleshoot it, if necessary.
Of course, when going static there's some things that are missing compared to Wordpress:
- Search
- Comments
- Analytics
While I didn't care much about comments or analytics (I could always embed third-party services like Disqus or Google Analytics), search was very important and it took me a while to implement something usable.
Using the LetsEncrypt Certbot, setting up TLS was as simple as ever and the Qualys SSL Server Check gave me an A rating for, which I boosted to A+ by manually setting the HSTS header. The only other thing I had to do was enabling HTTP/2, which Certbot doesn't do by default (there's not even a command line switch for it).