6 reasons to blog in Markdown with Jekyll

No readers like this yet.
Open in sky

Nasjonalbiblioteket. Modified by Opensource.com. CC BY-SA 4.0

As a programmer I sort and collect a lot of research, and my problem has always been finding a place to store it all. I had Jekyll in mind for a while, but it always seemed so daunting to get into. After a few days of configuration, I was able to create a Jekyll workflow that enables me to do a few things:

1. Store articles online

Jekyll is a blogging system similar to WordPress. The main difference is that unlike WordPress there is no database or web-accessible application to worry about security updates with. Jekyll accomplishes this by generating static HTML pages instead of relying on a database to generate them on the fly. Another upside with static HTML pages is that they are fast. Jekyll generates the HTML pages by parsing Markdown files.

2. 100% free

GitHub pages is a free offering that can host your Jekyll blog for free. It also takes care of generating static HTML files from your Markdown text files, so there's no need to install anything on your computer. You can also use Jekyll with your own domain name (if you have one).

3. Research style attributes

Pixyll is a Jekyll theme. You can quickly install it from GitHub by forking the official Pixyll repo. It's responsive, so it looks good on mobile as well as desktop. It's also the most comprehensive theme I've found, as it natively supports Google Analytics, Disqus integration, code fencing, paragraph linking, highlighting, hyperlinking, quoting, citing, footnotes, tables, lists, images, video, <!--hidden comments--> , strike-outs, italicising, bolding, emojis, etc. I personally like to use Dropbox to host images and video, as this enables me to also use this workflow on my iPhone.

4. Collaboration with colleagues and the world

If you are a programmer, you most likely already know how to use GitHub collaboratively. If you don't know your way around Git, you can still use GitHub to collaborate with others through their online text editor capabilities. Since Pixyll has native Disqus integration, you can also use this as a way to communicate and collaborate with everyone.

5. Automatic uploading / downloading

I need focus when I do research. My writing is often messy and I like to move fast. I'm constantly renaming, deleting, and moving files. It's all very unorganized at first, until it finds its own path and turns into something more refined.

It has to be as fast as speed of thought. Anything slower and you wont be "nudged" into using it. So when an idea strikes, there is no barrier that holds you back. Updating your blog should be as easy as editing a local text file.

This is where GitSync comes in. GitSync does all this for you without lifting a finger. Every file change you make is synced to GitHub instantly. If you collaborate with others, you may get the occasional prompt asking which file you want to keep. You get three choices. Use yours, theirs, or a combination of both.

6. Works on any device

On my laptop I use Atom as the text editor for Markdown files. It supports live previews of GitHub-flavored Markdown files. I set Jekyll to use Redcarpet Markdown, since it is the only Markdown flavor I've found that supports code fencing when hosting on GitHub pages. On my iPhone I use Textastic as the text editor. It also supports Markdown and iCloud. You need to bring iCloud into the fold if you want to have text sync from your iPhone to your blog in real time.

Atom text editor screenshot Atom.io (The green and orange colors indicate Git status). CC BY-SA 4.0.

In conclusion

It took me about three days to research, learn, contribute to, and implement a good workflow with Jekyll. Then I made a video that shows you how to do it in 30 seconds.

User profile image.
Norwegian millennial currently building stylekit.org, recently featured on https://www.producthunt.com/tech/stylekit

5 Comments

Ill be happy to answer any questions in this comment field. happy blogging.

How many articles do you have on your site? Do you find Jekyll under-performing when dealing with the larger number of articles?

I'm asking this because, in my case, on my site with ~200 articles, it takes approximately 4.5 seconds to regenerate the site on my local machine. Hugo (http://gohugo.io/), the other static site generator that I found, proved to be much much faster (on the same sample rate, Hugo takes 0.4 seconds to regenerate a site).

In reply to by Eonist

Hey Aleksandar,

In case you're wondering, the reason why Jekyll is slower compared to Hugo is because Jekyll uses Ruby while Hugo uses Go. Ruby is an interpreted language and is slow. Go, on the other hand, is a compiled language with similarities to C/C++ and thus faster.

In reply to by r3bl

I have quite a few. maybe 50? Will add another 50 shortly. I have a backlog of articles. I also dont generate the articles on my local machine. I let github do that work. I think Github uses some third party service to do it for them as well. The updates are pretty instant on github after a change / commit. That said I did use local article generation when I experimented with creating a tag system for the site. But my time was up so i had to move on.

So Jekyll 3.0 apparently added Incremental regeneration https://jekyllrb.com/news/2015/10/26/jekyll-3-0-released/

I haven't tried the above approach but, my initial understanding was that it only generates sites that has changed. Not every article every time.

This will probably speed your site generation up. Let me know how it goes :)

Creative Commons LicenseThis work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.