π

Building a website using Lazyblorg

Show Sidebar

In this post I describe my ordeal to build this website.

Django: my old setup

My old site was built using Django. It looked quite a lot like this one, same color scheme and such but there were a few problems.

First of all was the load it put on my web server. I never got caching working quite right, so all pages were being rendered by python from a MariaDB database. My little webserver does not like that, and page load times became quite slow. And I wouldn't want to think what would happen should my site suddenly become popular. Secondly the CMS it used was based on Django admin, and while it was ok, nothing can beat Emacs.

But most important: i am not a web developer. I want to build my own website mainly because i don't want to use privacy invading third party tools and for the learning experience. Like it or not, web is all around you. So knowing at least something about web development is a really good thing.

My main issue was keeping the webserver running properly across updates. Every time I updated the server I had to hope that the uWSGI/Gunicorn service came back up properly. And if it didn't, dig through many cryptic error messages to find out what went wrong.

Then I upgraded the server from Debian Jessie to Debian Stretch. The webserver never ran again.

Generated static HTML setup

So I concluded that the Django setup, while nice, was just to complex for me. I wanted to move to a new setup using generated static HTML. Now to find a good system for that.

I have been using Emacs with org mode for a few years now, so it seemed logical to also build my website using it. I knew org mode had powerful export capabilities, but to export an entire website, including a blog, is a bit much for vanilla org mode. So, I started searching for blog solutions based on org mode and quickly stumbled across this page https://orgmode.org/worg/org-blog-wiki.html.

Emacs org mode blogging, but which one?

It appears that there are quite a few org mode blogging projects out there. But which one is the best for me? First a quick summary of what I wanted

  1. Relatively simple setup
  2. Included web design that I can easily modify, because I suck at front-end design. It has to be responsive and a bit modern-ish.
  3. Static HTML. No back-end required.
  4. KISS. As simple as possible, but not too simple.
  5. Preferably in-Emacs, but this is not a hard requirement

So after poking around for a bit my eye fell on o-blog. It looks good, integrates in Emacs and is directly install-able from the Emacs repositories. AND, it ticks ALL of the boxes above! Except that the project seems abandoned. And it doesn't run on Emacs25. A few people seem to have tried and failed to get it working, and I'm absolutely not going to maintain a old Emacs install indefinitely for my new site. So o-blog was out.

Next, I looked at org-page. Its install-able directly from Melpa, there is some life in the project and it has a reasonable layout. It does require quite a few dependencies, but the thing it made me look further was the complexity and the templating system. After quite some time reading through the code and documentation, I still did not really know what did what, and never got through the installation process. The git system for publishing, although really powerful, does not fit in my KISS requirement.

Lazyblorg

Then came lazyblorg.

The first time I scrolled over it because it was still under development and is a external python program instead of a Emacs package. Nothing against python, it is my favorite programming language, but it seemed logical to do org mode stuff directly from within Emacs.

But when I revisited lazyblorg after studying the other packages, it suddenly seemed like a better solution. After only a short time of reading i figured out the entire templating and post generation system. Although not the most elegant, it is super simple and easy to understand. And those are my most important points.

The developer states that it is easy to configure and start building, and is absolutely right.

In just a few hours I went from installing dependencies to having a fully working website, including some layout and CSS customization. The included HTML and CSS is easy to modify so i could (lazily) make the site look like I wanted it to without too much digging in many little files. I even managed to make it look a lot like my old site without too much effort! Lazyblorg really lives up to its name!

And as a extra bonus: it is entirely HTML5. Even the responsive bits. So there is NO JavaScript AT ALL. I really like that. Okay, it might cause some issues in older browsers, but really, those people should update their software anyways. I think JavaScript is way overused in the modern web, so having a site with no JavaScript at all is a nice idea.

I also really like that the blog is regenerated every time. Why? Isn't this very inefficient? Although inefficient, regenerating on my desktop PC takes only a few seconds and this way I know that every change is properly implemented no matter how often I change my mind on tags, id's etc. And there is no database to corrupt or place the wrong data into that requires SQL surgery to repair. Everything is under direct control using just the tags in the source files and I think that that is perfect.

Conclusion

I really like lazyblorg, and I'll happily manage this website with it for as long as possible.

I managed to get it looking quite nice, and even a bit like my old site, and the functionality is just plain awesome. I did strip out the disqus system because I do not want any external elements, unless they are extremely important and are free software.

Thanks to the developer Karl Voit for this awesome piece of software! And for the CSS, that I modified for this site.