Blogging with Jekyll
This is my third-ish attempt to maintain a blog. I have tried Wordpress and Ghost before—and failed miserably. Maybe it's because blogging isn't really my thing, but somehow I keep coming back to give myself another try. So, here I am again with Jekyll, another blogging engine.1 Good luck with that, myself.
How I ended up choosing Jekyll was actually quite personal, I won't elaborate in this post. I'm not going to explain how to install Jekyll as a blogging platform either, because so many cool kids have done that. I just want to share how I configure it to fit my needs.
Local machine setup
I want to develop my own theme for my blog, so I need to install Jekyll on my local machine. The installation is quite simple as described on Jekyll's installation page. I edit the default layouts, add some plugins and play around with CSS2 using Sublime Text. For the record, I enjoy this step more than writing any posts. Geek alert!
I could've just deployed the site on Github Pages for free and called it a day. However, as a control freak, I want to have full control of my blog. Besides, I don't want all my files to be accessible to public. So I deploy a Linux virtual server on DigitalOcean (referral link) as my web server. I install Jekyll there and setup nginx for HTTP server until at least a Jekyll page appears on the browser.3
The next thing I need to do is upload the theme I have developed on my local machine to the server. At first, I configure a Keyboard Maestro macro to simplify uploading files to the server via Transmit and it's done. However, it only works nicely when I am on my Mac. It isn't as practical as I expected for blogging from my mobile devices. I want to be able to write a post on my iPhone or iPad and instantly publish it. I know I need a syncing service.
iCloud is not an option since my server runs Linux, so I turn to Dropbox (referral link). I install Dropbox on the server, sign in with my account, and setup a Jekyll folder.4 On my local machine, I clone the Jekyll repository to the Dropbox's Jekyll folder via git. After it's synced to the server, I build a Jekyll site on the server's http directory with command
jekyll build --source /path/to/Dropbox/jekyll/ --destination /www/html/or/whatever/blog/ --watch. Now it's watching Dropbox's Jekyll folder, and instantly pushing new posts to the http directory.
Now that the blogging engine's been built, the next step is setting up my writing tools. Byword is my favourite Markdown text editor on my Mac and iOS devices. It supports iCloud and Dropbox sync, and that is all I need. I setup Dropbox on Byword to sync the Jekyll's
_post folder on every devices. That way, I can publish a blog post only by writing something on Byword, save it, and boom, it appears on my blog. Oh, and I create a TextExpander snippets to make YAML front matter creation in the beginning of every post a lot more convenient.
That's it. So far, I'm quite happy with the setup and still have the interest to post something here. We'll see few months from now (:
Update 01 October 2016:
I have moved the blog to Blot. Surprise, surprise!
Jekyll is actually a blog-aware static site generator as described on its website.↩
Which I still do until now because there's always something needs to be fixed.↩
I have no idea what I did, I'd struggle doing it again.↩
I was kind of surprised how smoothly it was to install Dropbox on Linux with only command lines. I have tried Bittorrent Sync but apparently I am not geeky enough to be able installing it on my Linux server successfully.↩