Date Modified Tags EN

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

I begin with why. Here are several reasons that motivate me.

  • Improve my writing English skill
  • Enhance communication
  • Writing about what I've learned should help me understand it better
  • Show my qualifications, experience and competence
  • Let others know me better
  • Share solutions and other useful info I came across in my work and life

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

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

Why not using one of numerous content management systems?

Some time ago I had experience with websites built using 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 have better devoted to writing new content or marketing it.

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

  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. Because of fewer server-side dependencies, the website built with SSG is reliable. 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 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. Hosting static pages is cheap if not completely free. A static site is lightweight, and can be hosted by any server able to return HTML files. I use 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.

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.

Back to my website. I used to store the source code in Bitbucket, build HTML files locally on a computer, and send them to GitHub Pages for hosting. Quite inconvenient, huh? I was seeking for a better solution of course, and I've found it. ideally fits my needs. I do changes to the text files, and GitLab does everything else: running a pipeline building HTML from Markdown and hosting them. I'm happy with this workflow.