The search

Having decided to ditch WordPress as the CMS on my site and use a static site generator, I started my search for one. General reading on the web seemed to all point at Jekyll, I did not like the fact that the content format in Jekyll was mostly fixed. I explored many other systems Hexo, Hugo, Pelican, Hyde, Brunch, Middleman, Harp, Expose, …

A couple of them were in PHP as well and thus tempting, but all of them proved to be rather inflexible and not what I was looking for. Then I remembered Kushal Das used something for his blog. I asked him and he pointed out to a script that he used, but more importantly, he mentioned Lektor.

Why Lektor...

What caught my attention was that Lektor was written by the author of Flask, a Python micro-framework which I love.

The installation was super simple, and I had the quickstart running in minutes. What stood out immediately was that Lektor had an admin interface which opened in the browser and second the build system was incremental and ran as soon as I saved anything in the admin.

Lektor is not a fixed format CMS, but it is more of a framework. From the introduction to Lektor - "You can model your own blog posts and render them with the templates you want to use. There is not a single built-in template that you have to use. The only thing it gives you is a quickstart that sets up the folders and copies default minimalistic templates over."

The transition

I now wanted something which could import WordPress posts into Lektor. Unable to find any such plugin I hacked my own WordPress to Lektor export plugin. The plugin works pretty well, and I could export 1200 posts from my old blog to Lektor. Unfortunately, it turns out that Lektor does not scale well as of now. So I dropped the idea of converting the whole of the old site to Lektor and started afresh. A new design and a new set of functionality.

As I kept creating templates for this site, I kept incorporating more and more features. The complete code for this website is available on GitHub. The generated content is also tracked in a separate Git repo. As of now I have not actually set up a deployment pipeline but will do in due course. For comments I use Disqus, the search is Google Site Search.

The old content was converted to static files using the Simply Static Wordpress plugin. Before turning WordPress to static pages, I switched to Disqus comments and Google Site Search so that visitors do not loose out on these essential functionalities.

Sharing in caring

Tarique Sani

Do what
you love

Pediatrician and a Forensic Expert. A passionate PHP geek. Currently CTO, SANIsoft. Also a cyclist, photographer, bird watcher, nature lover and a FOSS enthusiast.

Social Links :

Success/Error Message Goes Here

Drop me a line

Use this form to tell me about your project, ideas or needs. I will be in touch with you soon.