bgdn.me

Personal blog about reading, learning, thinking, and a little bit of IT.

My website: why and how


  • Sun 02 October 2016
  • Blog

In this post, I'm going to describe why and how I built my personal website.

I'll begin with why. Here are several reasons that motivated me in the first place.

  • Improving my writing English skill
  • Enhancing communication
  • Writing about what I've learned should help me understand it better
  • Showing my qualifications, experience and competence
  • Letting others know me better
  • Sharing solutions and other useful things came across in my work and life

Now, here is how I've built my website.

I've been using Pelican, a static site generator. I write and keep content in markdown, and the tool generates HTML files out of it all. I've chosen Pelican because it's written in Python, which is familiar to me.

Why not using one of many content management systems?

Some time ago, I actually had experience with websites built with a CMS. The worse thing about managing it was technical overhead of merely keeping the website up and running. Maintaining would take a lot of time, which I could spend on writing new content or marketing it.

Here are some good reasons why I'm fond of static site generators (SSG).

  1. Performance. The static pages were what the Internet had started with. Just flat HTML pages. You don't need a server running database, interpreter, or something like that. A client requests a web page, and they get it immediately without a need for processing the request on the server side.

  2. Reliability. Because of fewer server-side dependencies, the website built with SSG is much more reliable as opposed to CMS. You're not going to struggle from database failures, or PHP running out of memory. And you ain't afraid of another server upgrade by your hosting provider, which sometimes bring in unexpected issues.

  3. Security. If a server doesn't run a database, or contain script execution environment, there's merely nothing to hack. So you don't have to maintain security patches just to avoid your site being defaced or something.

  4. Cost efficiency. Hosting static pages is fairly cheap if not completely free. A static site is lightweight, and can be hosted by any server able to return HTML files. I use Gitlab.com for both hosting and building pages from the source code. And it's free.

  5. Version control and Markdown. The source code of a static web site is just a collection of Markdown text files, templates, and possibly some JS files. Everything can be stored in Git repository, which simplifies backup and makes easier to undo any change. In addition, for creating and editing content I can use a favorite text editor instead of writing in clumsy WYSIWYG web editors.

That's why I'm convinced that if you need a content-based website like blog or news portal, you definitely should not go with any kind of a typical CMS. Take a look at a static site generator that could turn out to be an ideal tool for you.