Search code examples
jekyll

What does Jekyll actually do?


I learned about this thing, called Jekyll that, supposedly, builds sites for you, somehow.

I'm not that great at frontend, so from what I read I understood that Jekyll builds a webpage out of resources you already have. So, why would I need Jekyll, if I already have my index.html, about.html and other pages?


Solution

  • if I already have my index.html, about.html and other pages?

    If you had all of those, you wouldn't be using Jekyll.

    Jekyll's website is poorly structured and is written/designed in marketing speak, so it's hard to understand what it's doing if you don't already have an idea. Jekyll, and similar tools like Pelican, are just tools for building a blog-style website where you author the content in some flavor of Markdown (or similar lightweight markup languages).

    That's it. You write a bunch of Markdown pages, and Jekyll builds the HTML for them.

    The point of Jekyll and similar tools is so that you can focus on content creation and not on the various details of blog creation. You can simply state that one or more Markdown files are in a particular category and Jekyll will build the categorization pages and links for you. You don't have to worry much about providing date information or copyright notices.

    Building a home landing page that offers synopses of the most recent 10 posts, for example, can be automatic; you don't have to go through the most recent pages and crop out the first paragraph or two, then copy them into the home page. And you definitely don't have to do that every time you update the blog.

    Now, there are many content management tools with a database front-end that can do these things already. The point of tools like Jekyll is that they're static while those others are dynamic. They generate a set of HTML that represents the totality of the site at a specific moment in time. It doesn't query information from a database or something; the source data is just a bunch of text files.

    Not only does this make authorship a bit easier (you're just writing Markdown files), it also allows you to use hosting providers that only work with static content like GitHub Pages.