Emacs Blogging
How I finally made a blog with org-mode.
When I started off with development, one of the first tasks that you are typically supposed to do is make a blog. Me, a first year undergraduate completely new to the world of programming was handed a bunch of .js
files with the expectation to build a blog out of it.
And I did, eventually.
Except for the tweaks in CSS, which I stole from other websites. There were massive problems with that blog.
- It didn't scale well
- If you added a blog, the text didn't wrap properly.
- The interface to add a blog was, 1940s to say the least.
Nevertheless, that project didn't go well, and my hopes of writing amazing technical blogs to share my infant JavaScript knowledge lies rested in my ~/web-dev/projects/blog
folder.
Static Site builders.
A great concept in itself, maybe you are using Jekyll, Hugo
or maybe even react
to build yours, but I had my handful of journey coming here.
I was introduced to markdown
pretty soon. Every developer has to make one. But I also had the requirement of introducing math in it, which made a bit difficult to the right software I need.
I tried Jekyll
and Hugo
both, but both of them, despite being excellent software felt a little bloated. A lot of directories, and template make a mess of what a simple requirement I had, write and post.
I did found an old school solution called MDWiki, which to be honest is pretty great, and was my preferred way to deploy something in case I want a quick web page. But then I met something else,
Enter Org-Mode
Org-Mode is the single most transformable dictating software that make you want to put your plain life in a plain text, but with markup and extra features to keep you satisfied.
It's feels like a home in its self, whether is coding, documentation, planning, thinking, journal or even all of that together. Org will be there, org will be your best partner in this.
Nikola
The plugin Nikola, was like godsend to me in writing a blog. It's painstakingly simple, almost to the point you start arguing how that's possible. There simple to use CLI
already makes things simpler, but since it's written in python, all the configuration files are simple dictionary which give you direct programmatic access to your variables, and there is no messy conversion of other format, even though that's possible if you may explicitly need it.
Putting it all together.
All I need to do is install the org-mode-plugin, edit the conf.py
, and boom. I can start writing blog posts. I changed my editor export EDITOR="emacsclient -c"
and there I can edit files in org easily.
Furthermore, I still haven't integrated the whole method into Emacs, but I will use a bash script to automate all the process and bind them to commands in Emacs using shell-command
function, until I find a better way to learn more elisp
and write its independent function.
Comments
Comments powered by Disqus