Jekyll, Windows, Pain: Part 1
As you might have noticed I am using Jekyll for this blog. It is really nice and allows you to generate content very quickly. Being developer I am using my everyday tools for blogging: Visual Studio Code and git. Something like described here (but not exactly).
Setting up Jekyll on Windows is not that hard, expecially if you’re using cool stuff like chocolatey. It’s just about
Just too easy, right?
Next step is adding ability to comment. Unlike guys requiring to make pull request with comments I prefer Disqus. It is extremely easy to get installed to the blog. I was really quick in the first step of “Make It Work Make It Right Make It Fast” workflow: adding comments to the single post. I just copy&pasted snippet to the post markdown file.
But when I tried to proceed to the next level and add that to the post template, I figured out that there is no post template at all in my site folder. It turned out that default stuff like templates, styles and so on is not kept in the blog directory – but rather in some centralized location. After quick googling I found magic spell that reveals that location theme (minima in my case) used by Jekyll:
So I copied templates from there to my local site and started to add Disqus code there. When I was almost done, for some reason I re-read mimima’s README.md.. and noticed that Disqus is supported out of the box. Just like Google Analytics that I also had hand-crafted already.
Well, I realized that I just had done things in exactly opposite way. Instead or reading the manual and changing several lines in configuration, I spent few hours copying and pasting JS code, then trying to recreate default page templates, then looking for location of theme’s stuff etc… I definitely should have started reading the docs before doing that stuff.
Though it is all typical for our industry, isn’t it? Do things first, think later. At least I got some experience.
And finally I got OK. I reverted all my changes, then made needed configuration changes and even got Disqus comments showing on my local machine!
But I was far from the happy end…
to be continued…
Yes – I also noticed that there are Pain and Jekyll in this post but no Windows. It is be in the next part.