Whenever installing open source based software, I frequently lose confidence whether I'm on the right track in the course of doing it. It's mainly because I'm not sure if the instructions on the net is suitable for my setting, if I fully understand them, and if I follow them correctly. If I miss something, things go wrong and I have trouble in reverting back, easily get lost. Therefore it's natural and safe to have my first post on Jekyll platform to be about how to install it.
Jekyll is based on ruby and the installation process heavily uses ruby companion tools. macOS is coming with factory installed ruby, which I was not aware of until now, but it's not suitable version to install Jekyll. So, we need to start from there.
Ruby Version on macOS 10.12.6 Sierra
Jekyll actually does some more magic like templating, pagination, syntax highlighting, etc., And also, Jekyll posts and pages can be written in easily readable markups like markdown, text, textile (not supported anymore after Jekyll 3.0 update) etc., Understand the structure of Jekyll. Jekyll is simple if you understand what feature is for what. Edward Griffin is to be commended for this splendid work. At first glance The Creature from Jekyll Island is a huge book. While this may be daunting to some, once the book is actually started, it flows smoothly and reads quickly.
In my setting, I have ruby 2.0.0p648 and gem 2.0.14.1 as follows.
Also, I have following ruby based components already installed. You don't need this info to install Jekyll, it's just for my record.
Install Jekyll, First Trial
When I tried to install Jekyll in the setting above I got following error.
Since it says I have no permission for /Library/Ruby/Gems/2.0.0
, I tried sudo
.Now, I realized I needed ruby version equal to or higher than 2.1.
Upgrade Ruby
According to internet, there are many ways to install ruby on macOS with some of them obsolete. I chose to use rbenv to install ruby and, in turn, I need Homebrew to install rbenv. Just check current brew version for the record.
Install rbenv using brew. Great… I have another error, about Xcode this time.
Try to install xcode-select. Looks good.
Try again to install rbenv.This time I come across Error: The 'brew link' step did not complete successfully
Sunday express mac os.
As the error message suggested, I ran brew link autoconf
.Oh, I don't have write permission on /usr/local/share/info
. I changed the permission and tried again to success.
Now I am ready to install ruby. (Not Jekyll!)Using following command, I can see numbers of available ruby versions.
As of today, the latest stable version looks 2.5.0. Get it.
Make macOS Aware of Ruby 2.5
Now I have two versions of ruby, the factory installed 2.0 and the upgraded 2.5.When I run ruby -v
in the terminal, I can see 2.0 running.
To make 2.5 to run, I need to dig in rbenv configuration.
As shown below, I have hidden folder .rbenv
under my home folder. Note that there is no version
file in it yet while I got versions
folder.
Run rbenv global 2.5.0
and check .rbenv/
to find version
file, which tells ruby version number I want to use.There are three way to let macOS aware of ruby version, global, local, shell
. For more info, read this.
Unfortunately we am not there yet. In .rbenv/shims
, we have a collection of scripts to run ruby.This folder should be in PATH
environment variable so that macOS know where to search for ruby 2.5.
Add following line in your bash config file, which is ~/.bash_profile
in my case, and restart the terminal.
Run ruby, then you will see it's running version 2.5.
Install Jekyll, Second Trial
At last, we are ready to install Jekyll.
What can i do at home? mac os.
Oh, we need to install bundler too.
Make Your Blog Folder
Run following commands and open http://localhost:4000 from your browser, then you can see Jekyll blog is running.
However, you still have it loaded to GitHub and probably want to change its theme. So, let's continue.
Make GitHub Repository
If you are sure you don't need to change Jekyll's default theme, you just have to make GitHub repository, and run following commands in my-awesome-site
folder. Otherwise, just go to next section.
Change the Theme to Centrarium
If you want to change the theme as I do, it may be easier to do as follows. I will use Centrarium theme.
- Forget
my-awesome-site
folder. - Make another folder, which is
ryuci.github.io
in my case. - Download Centrarium files to the folder.
- Tweak it according to your need. Tweaking Centrarium Theme might be of help.
- Run following commands.
Activate Your Blog
Using Local Folder
Run following commands and open http://localhost:4000 from your browser.
Using GitHub
Open http://ryuci.github.io from your browser.
That's all, folks!
Developer(s) | Tom Preston-Werner, Nick Quaranto, Parker Moore, Alfred Xing, Olivia Hugger, Frank Taillandier, Pat Hawks, Matt Rogers |
---|---|
Initial release | November 5, 2008; 12 years ago[1] |
Stable release | |
Repository | |
Written in | Ruby |
Operating system | Cross-platform |
Platform | Web |
Type | Blog publishing system |
License | MIT License |
Website | jekyllrb.com |
Jekyll is a simple, blog-aware, static site generator for personal, project, or organization sites. Written in Ruby by Tom Preston-Werner, GitHub's co-founder, it is distributed under the open sourceMIT license.
History[edit]
Jekyll was first released by Tom Preston-Werner in 2008.[3] Jekyll was later taken over by Parker Moore, who led the effort in releasing Jekyll 1 and has been the new maintainer since then.[4]
Jekyll started a web development trend towards static websites.[5] As of 2017, Jekyll is the most popular static site generator, largely due to its adoption by GitHub.[6]
Features[edit]
Jekyll renders Markdown or Textile and Liquid templates,[7] and produces a complete, static website ready to be served by Apache HTTP Server, Nginx or another web server.[8] As Jekyll is a static site generator, it does not use databases[9] to generate the pages dynamically. Instead of using databases, Jekyll supports loading content from YAML, JSON, CSV, and TSV files.[10] Content inside the Data Files (YAML, JSON, CSV and TSV files) can be accessed via Liquid templating system.[11] Jekyll is the engine behind GitHub Pages,[12] a GitHub feature that allows users to host websites based on their GitHub repositories for no additional cost.
Jekyll can be used in combination with front-end frameworks such as Bootstrap,[13] Light and shadow mac os. Semantic UI and many others.
Jekyll sites can be connected to cloud-based CMS software such as CloudCannon, Forestry, Netlify or Siteleaf, enabling content editors to modify site content without having to know how to code.
Philosophy[edit]
According to Jekyll's 'README' file,[14]
Jekyll does what you tell it to do — no more, no less. It doesn't try to outsmart users by making bold assumptions, nor does it burden them with needless complexity and configuration. Put simply, Jekyll gets out of your way and allows you to concentrate on what truly matters: your content.
References[edit]
- ^'jekyll/History.markdown at master · jekyll/jekyll'. GitHub. Retrieved 26 October 2020.CS1 maint: discouraged parameter (link)
- ^'Release 4.2.0'. 14 December 2020. Retrieved 8 January 2021.
- ^Preston-Werner, Tom (17 Nov 2008). 'Blogging Like a Hacker'. Preston-Werner.com. Archived from the original on 19 Sep 2019. Retrieved 10 Oct 2015.CS1 maint: discouraged parameter (link)
- ^Autrand, Aaron. 'Interview with Parker Moore from Jekyll'. netlify.com. Archived from the original on 13 Mar 2021.
- ^Christensen, Mathias Biilmann (16 Nov 2015). 'Static Website Generators Reviewed: Jekyll, Middleman, Roots, Hugo'. Smashing Magazine. Archived from the original on 27 Aug 2016. Retrieved 2 Feb 2016.CS1 maint: discouraged parameter (link)
- ^Williamson, Eli. 'Top Ten Static Site Generators of 2017 | Netlify'. netlify.com. Archived from the original on 13 Mar 2021. Retrieved 11 Feb 2018.
- ^http://liquidmarkup.org
- ^'README.markdown for Jekyll software'. Jekyll's authors. Retrieved February 19, 2014.CS1 maint: discouraged parameter (link)
- ^'Jekyll • Simple, blog-aware, static sites'. Jekyll • Simple, blog-aware, static sites. Retrieved 2020-11-09.
- ^'Data Files'. Jekyll • Simple, blog-aware, static sites. Retrieved 2020-11-09.
- ^'Data Files'. Jekyll • Simple, blog-aware, static sites. Retrieved 2020-11-09.
- ^'GitHub Pages'. Jekyll's authors. Retrieved February 19, 2014.CS1 maint: discouraged parameter (link)
- ^Patton, Tony (2014-07-16). 'Build full-featured sites with Jekyll, Bootstrap, and GitHub'. TechRepublic. Retrieved 2015-10-11.CS1 maint: discouraged parameter (link)
- ^'README'. October 18, 2018. Retrieved October 30, 2018.
External links[edit]
- Official website