[Jekyll] Building My Own Blog with GitHub Pages - 1. What is Jekyll?
[Jekyll] Building My Own Blog with GitHub Pages - 1. What is Jekyll?
※ This post has been restored from an old post written during the Jekyll era.
You can create your own blog through a major portal or one of many big and small platforms. Blogs built on such platforms are easy and convenient — you can set one up with a linked account and a few button clicks. However, blogs like this have a fixed basic page frame, and free customization is fairly limited. To build a blog that reflects your own color or values, you need to find a way that isn't so-called "off-the-shelf," which in turn leads to the large task of building an entire web service yourself — creating and publishing pages, and handling hosting. Even if you somehow manage to build the page, features beyond the frame itself, like design via CSS or extra functionality via JavaScript, are even harder than building the frame. Even if you somehow pulled all of that off on your own, hosting costs money. If you add a DB on top of that, the cost grows even larger. All I wanted was a simple blog.
Using GitHub Pages can solve most of these problems. Through the GitHub Pages project, GitHub publishes files stored inside a Repository with a specific name to a github.io domain. In other words, you effectively get free web hosting. Simply by creating a Repository following the method GitHub Pages lays out, one big hurdle — hosting, which is normally the only part that actually costs money — disappears.
Repository: a unit of project managed on GitHub. Each account can freely create, modify, and delete multiple Repositories.
Unfortunately, this only lightens the hosting process — actually publishing a page still requires web coding knowledge. To address this, GitHub provides an environment where users can easily create and use blog themes through a framework called Jekyll.
Despite having some web-related knowledge, I found it took quite a bit of time to understand this somewhat unfamiliar environment of Ruby and Jekyll. Through this topic, I'd like to share how I built my blog with people who have similar or even no knowledge of the web. This post focuses on making it as easy as possible for those encountering the concept of Jekyll for the first time to understand it.
Yes, it's the same "Jekyll" from Dr. Jekyll and Mr. Hyde. Jekyll is a framework developed in the Ruby language by Tom Preston-Werner, one of the founders of GitHub. Since GitHub itself has a built-in Jekyll CMS (Contents Management System), it's very well suited for Jekyll hosting. (Of course, hosting works fine even without a Jekyll-based site.)
Among the ways to categorize the web, there's Static and Dynamic. Jekyll is a framework for a static web environment.
Static web
- Responds with a pre-saved page for each request
- No need for a web server, so it's less affected by server specs
- No back-end code, making it simple to build
- Fast speed
- Suitable for small sites that don't need complex logic (blogs, etc.)
Dynamic web
- The web server processes and delivers data for each request
- Supports data CRUD through DB integration
- The same page can respond differently depending on the request
- Speed can degrade depending on the web server's specs
- Suitable for business sites that require complex logic (shopping malls, etc.)
Most of the sites we use are dynamic web in nature. If a site has its own membership sign-up system or a simple bulletin board, it can generally be considered dynamic web. Membership sign-up and bulletin boards inevitably require a DB, which in turn means you need a server to control the interaction between the DB and the site. Thanks to the DB, real-time data CRUD is possible. If users can perform any meaningful content action on the page, it's a dynamic web.
Conversely, a static web simply shows pre-saved files in response to requests, so the user is nothing more than a mere visitor to the site. For a blog, there's no need at all for user authentication like login, and since no author other than the owner is needed, it can be perfectly served in a static web form. Jekyll builds the code written by the user into a single web project. By adopting this static web approach, Jekyll gains fast speed and removes the burden of back-end code.
Before using it, know that with Jekyll, the person responsible for publishing the blog is you yourself. In other words, you can control every single page in fine detail — and you have to. This degree of freedom is a powerful advantage for some, but a drawback that would be better left out for others.
Jekyll is a good fit for people who...
- Want a blog with their own personal touch rather than a cookie-cutter blog
- Have basic web knowledge or an equivalent sense for it
- Want to implement various features
- Can find all of the above enjoyable
Jekyll isn't a good fit for people who...
- Just want a stable blog, no matter what
- Have a hard time spending time on this kind of messy, hands-on work
- Want to start a blog right now
- Prefer to avoid complexity
With Jekyll, you have to build everything yourself, from top to bottom. Even that common comment feature has to be set up using a plugin. In other words, even features you'd normally expect a typical site or blog to have must be built by you personally. If you want, you can implement anything you like on your blog, but conversely, if you implement nothing, it's just a bare, unadorned page fragment. The same goes for creating categories or tags. If you don't find enjoyment in doing this kind of thing, I personally wouldn't recommend it much.
Of course, being able to apply beautiful themes is a unique strength, but even something like Tistory already offers a platform format with powerful customization. Even so, if you choose Jekyll, Jekyll will give you an experience unlike anything you've encountered on any other blog.
