Hello folks. I recently moved my blog posts from wordpress.com to github pages, and I am using Jekyll for static site generation from markdown files. Jekyll is a ruby gem for generating static sites.
As part of the setup I was going through github pages docs which also mentions how to integrate Jekyll. And also Jekyll has their own docs for intgetration. As a newbie to ruby and blog setup, I was struggling a bit. I tried several ways mentioned in the docs and other blogposts for integration and finally was able to integrate.
I have collated and noted down the ways by which jekyll can be integrated. I am presenting them here hoping it might be useful for others.
The below steps were tested on macOS High Sierra.
There are two ways to setup Jekyll:
bundle init
to create onebundle add Jekyll -v 3.8.5
(Version based on https://pages.github.com/versions/{:target="_blank"})bundle exec jekyll new --force --skip-bundle .
to convert the current site to use Jekyllgem "github-pages", "~> VERSION", group: :jekyll_plugins
where VERSION
should the github pages version.
bundle exec jekyll serve
and try opening the site from localhostThe above approach adds extra files like about page, 404 page, posts and pages directories, gitignores, etc. This will be useful for those who quickly need to start running their site.
The manual way mentioned below provides more control of what you need and what not. It does not generate those files.
bundle init
to create onegem "github-pages", "~> 202”
bundle install
That's it. It'll install github-pages and all it's related dependencies. It won't add additional files so you can create only whichever you want.
Hope this helps.