This post contains some of the problems I encountered while adding more functionality or fixing some errors to my Jekyll-powered blog.
A few days ago, I noticed that Jekyll generates different URL’s for different timezones.
For example, I have this as my publish date:
date: 2017-04-05 05:05:00 PM UTC
When I build my blog locally, it generates this URL:
http://127.0.0.1:4000/2017/04/06/the-specific-generic-cycle-of-uncle-bob/
…because in my local machine the date is April 6, 2017 01:05:00 AM.
But when I publish it to GitHub Pages, it generates a different URL:
http://127.0.0.1:4000/2017/04/05/the-specific-generic-cycle-of-uncle-bob/
The solution is to add timezone: UTC
in _config.yml
.
After that, when executing jekyll serve --watch
, an error popped up.
jekyll 3.4.3 | Error: No source of timezone data could be found.
Please refer to http://tzinfo.github.io/datasourcenotfound for help resolving this error.
I needed to install the gem tzinfo-data
.
When I tried gem install tzinfo-data -install-dependencies
, my machine installed it in the current folder instead of the folder where all the global gems are installed. (In my case, C:\Ruby23-x64\lib\ruby\gems\2.3.0
)
So I googled and found that I needed to do this: gem install tzinfo-data -include-dependencies --install-dir C:\Ruby23-x64\lib\ruby\gems\2.3.0
That’s it!
Just go to the docs jekyllrb.com/docs/pagination/
https://www.richwerden.com/2017/line-numbers-in-jekyll-code.html
“Little Stuff about Markdown I Always Forget and have to Google” by Chris Coyier