Home Hello Jekyll
Post
Cancel

Hello Jekyll

I have a new website. Until recently it was running on my Rails project Blog on Rails. However, it’s not progressing as fast as I need it to, so I decided to migrate my site to Jekyll. I’ve known about this static page generator written in Ruby for a long time, but only tried it out a few weeks ago. And I immediately fell in love with it. I have similar feelings about it as I had when I first started with Ruby on Rails. I type a few commands into the terminal, and suddenly I’m running a new website in my browser.

How does it work?

The way it works is that I have a template (specifically this one) that provides where on the page to display what, and how it should look. I then write the content itself in markdown which is a language designed for writing formatted text. It looks something like this:

1
2
3
4
5
6
7
8
9
# Heading

Plain text

[Link text](link)

**Bold font**

![Image](path-to-picture.png)

Once I have the page content finished, a single command will generate the entire page as a folder containing the .html files:

1
bundle exec jekyll s

I can then upload this to any hosting. I chose the better option for me, and set up a repository on Github that always deploys the current output from Jekyll from the current main branch to my Github Pages. I then pointed my domain to the Github servers. And it’s all for free.

The main advantage of Jekyll (and other static page generators as well) is that the output is a static site composed purely of .html, .css and image files. But at the same time, when I change something in the template, like the text in the footer, I change it in one file, but Jekyll changes it in all the .html files that contain the footer. So I have a very fast and secure site (without a database) that I can manage in a simple way.


P.S.: I’ve been using Markdown for annotations in Obsidian for a couple of years now. I highly recommend this deluxe software.

#100DaysToOffload 2/100

This post is licensed under CC BY 4.0 by the author.

Subscribe for my newsletter

Contents