To kick things off in the new year, here's a brand-new website to host all of my personal content. I decided to get rid of the clutter of running web services, and the first step of the process is PHP. It's not the right tool for the job, especially websites like blogs where the page doesn't have to be generated every single time a user requests it. In addition, bloated, dynamic CMS systems like WordPress try to pack more features than I actually need, plus they can be riddled with bugs simply because of the way PHP behaves by default. I don't need that.
That's where Pelican comes in. Pelican is a blog engine / site generator that creates static HTML pages. They're relatively small and easy to serve both on the client and server side. It's like going back to the plain static webpages from the 90's, but with better themes.
Here's how it works:
- I host a repository of Markdown pages that I want to run on the web server. Each time I edit part of the website or add a new page, it is registered as a commit in the repository.
- The CD worker gets triggered for each commit, re-generating the website using Pelican and deploying the new content to the web server.
- The web server simply reads the static files from the root directory upon receiving a request. No need to run a auxiliary backend like PHP-FPM, or even a Pelican service, to handle the requests.
For the next few months, I'm going to continue developing and refining this workflow. I really hope to start blogging actively this year - I have plenty of projects and problems to write about!