WordPress is the first choice for many people when it comes to creating a new blog or a simple company website. But there are sit­u­a­tions where WordPress, with its large range, far exceeds a web developer’s needs. Light­weight al­ter­na­tives such as Jekyll address this problem since the website generator is limited to the most necessary com­po­nents and therefore makes it possible to operate websites without database access or other ad­di­tion­al software. As part of a Jamstack, you can implement dynamic and high-per­for­mance websites using the static site generator in com­bi­na­tion with micro services.

What is Jekyll?

In November 2008, Tom Preston-Werner, one of the four founders of the developer platform, GitHub, released the website generator, Jekyll

under the free MIT license. Written in Ruby, it accesses a template directory that contains a set of struc­tures and static text files – markdowns – of different formats. These determine the layout on the one hand, and the content of the web project on the other hand, and can be adapted in­di­vid­u­al­ly for this purpose. The generator does not provide a WYSIWYG editor, but requires classic code writing. Therefore, the content editor, Prose, is rec­om­mend­ed, which sim­pli­fies markdown editing and is optimized for Jekyll.

Before changes to the code are in­cor­po­rat­ed into the live version of the developed web ap­pli­ca­tion, they can be viewed thanks to Jekyll’s own de­vel­op­ment server. The im­ple­ment­ed rendering engine, Liquid, then converts the files into a static website that can be delivered with any standard web server. This au­to­mat­i­cal­ly generates the HTML code in the back­ground when changes are made to the text files.

Here’s how to quickly create a Jekyll website:

But it’s just as easy to create graph­i­cal­ly more advanced websites:

The ad­van­tages and dis­ad­van­tages of Jekyll

Using Jekyll for blogs and other static web projects is a superior al­ter­na­tive to content man­age­ment systems, con­struc­tion kits, etc. for a variety of reasons. The main advantage of this solution is the sim­plic­i­ty that can be seen in both the work with the website generator and the created projects. Thanks to the pos­si­bil­i­ty of foregoing a database, you save time and effort on the set up and con­fig­u­ra­tion. In addition, the necessary database access is no longer needed, which has a positive effect on the website’s loading time. The min­i­mal­ist code, which is reduced to important functions and features, is present in all Jekyll themes, and con­tributes to good per­for­mance and easy project de­vel­op­ment and main­te­nance. Compared to classic CMS, Jekyll generates a de­liv­er­able markup after each amend and not only when a user accesses a page.

Jekyll also scores well when it comes to stability and security. Since the web server only has to deliver text files, Jekyll’s potential for error is con­sid­er­ably lower than for websites that have several different com­po­nents in­ter­act­ing with each other. And because no regular updates are necessary, the stable code framework also ensures high avail­abil­i­ty of the website in the long term. The security results from the fact that it doesn’t make much sense to attack Jekyll, since it doesn’t have CMS, databases, and scripts with dynamic elements (PHP, JavaScript, etc.).

While the highly-re­strict­ed code base is no obstacle for ex­pe­ri­enced de­vel­op­ers, newcomers will find it difficult to use the website generator. In the standard version, Jekyll does not have a graphical user interface, so in­stal­la­tion and setup must be carried out via the command line. Jekyll is also clearly inferior to many CMS and website de­vel­op­ment tools when it comes to the theme selection, since it lacks choice; other tools have hundreds or even thousands of design and layout templates. The same is true for the support, which isn’t very developed due to its small community and low dis­tri­b­u­tion.

The following table sum­ma­rizes Jekyll’s most important ad­van­tages and dis­ad­van­tages:

Advantage Dis­ad­van­tage
✓ Short loading time of the developed website ✗ No graphical user interface by default
✓ No need for setting up and main­tain­ing databases and CMS ✗ Long com­pi­la­tion time
✓ Has no reason to be attacked ✗ Only a few themes and plugins available
✓ No regular updates necessary ✗ Small community
✓ Great freedom for pro­gram­ming (optional: free choice of GUI and editor) ✗ No image-editing program
✓ Not dependent on specific formats or ad­di­tion­al tools ✗ Server-side scripting (e.g. for forms) is not possible
✓ Self-hosting or on GitHub servers (free) is possible
✓ Own in­te­grat­ed de­vel­op­ment server
✓ Version control via Git is possible

Jekyll and GitHub – the perfect re­la­tion­ship

GitHub is a constant component in developer circles. The online platform makes it easier to manage projects and publish program code, es­pe­cial­ly if there are several de­vel­op­ers involved. GitHub uses the open source ap­pli­ca­tion to manage open source code Git on its servers. These codes are stored in separate di­rec­to­ries.

Ad­just­ments to a project are initially recorded as forks, where the author receives a cor­re­spond­ing no­ti­fi­ca­tion and can decide whether they should be included in the original code.

Jekyll and Github work well together. Static site generator files can be easily pushed to a repos­i­to­ry for sim­pli­fied col­lab­o­ra­tion with other de­vel­op­ers and to take advantage of the platform’s con­ve­nient ver­sion­ing. Want to deploy a Jekyll site directly from GitHub? With IONOS Deploy Now, you can host your Single Page Ap­pli­ca­tion or Static site generator files for free - including SSL, staging, and DDoS shield.

Tip

Use Deploy Now to host static site gen­er­a­tors like Gatsby, Hugo, or Jekyll from GitHub on IONOS’s geo-redundant, DDoS-protected in­fra­struc­ture. Every time you make changes to your static site generator, Deploy Now au­to­mat­i­cal­ly triggers an update of the static content on your web space in the back­ground. Deploy Now also supports automatic SSL pro­vi­sion­ing and the use of staging en­vi­ron­ments.

What dis­tin­guish­es Jekyll from other blog gen­er­a­tors and CMS?

With Jekyll, sites can be created that work without a database con­nec­tion. However, compared to CMS, there is no option for in­te­grat­ing dynamic elements, so Jekyll can only be used to create static websites. However, CMS without databases are available, which are designed for client-side projects. Compared to Jekyll, however, these are more complex.

Tip

Explore other website gen­er­a­tors in our dedicated article on the best static website gen­er­a­tors.

Jekyll tutorial: how to create a website with Deploy Now

With Deploy Now, Jekyll, and Github, you can easily create your own website. Github manages the files, which you can then publish directly with Deploy Now. Any change to the source code can be quickly trans­ferred to the live version.

The following step-by-step tutorial will show you how to use the generator within the framework of the developer platform.

Step 1: Create a GitHub account

First, you need a GitHub account. To do so, go to the GitHub website and enter a valid email address, username, and password for your future account.

Then select the plan you want to subscribe to – the free version for an unlimited number of public di­rec­to­ries or the fee-based one for an unlimited number of private di­rec­to­ries. Lastly, you can op­tion­al­ly provide in­for­ma­tion about your pro­gram­ming skills and interests. You will then receive a con­fir­ma­tion email from GitHub and can then activate your account by clicking on the link in it.

Step 2: Create a repos­i­to­ry for the website or blog

Now that you’ve created an account, you can log into GitHub. The user dashboard gives you an overview of the in­di­vid­ual di­rec­to­ries, but doesn’t provide any in­for­ma­tion at the beginning. To change this and to lay the foun­da­tions for using GitHub Pages, you first have to create a new repos­i­to­ry.

Until now, the directory is a common GitHub project directory. To convert it into your web repos­i­to­ry, you’ve got several options.

Step 3: Connect Github account to Deploy Now

If you don't have an account with Deploy Now, you can create one for free. Start a new project and connect it to your GitHub repos­i­to­ry. Select Jekyll in the con­fig­u­ra­tion panel to get started adding content to your website.

Step 4: Publish first sample page with welcome message

During the theme selection, a con­fig­u­ra­tion file (config.yml) and an index page (index.md) are au­to­mat­i­cal­ly generated. By default, the latter is the preview example for the selected Jekyll theme, which is why it is already available in markdown format. You can edit both the start page and the con­fig­u­ra­tion file by selecting the cor­re­spond­ing file and then clicking on the pen icon on the menu bar.

Delete the code and then add a welcome headline for your website:

## Welcome to my website!

If you save the welcome message via the 'Commit changes' button, you can access your first page at any time via the repos­i­to­ry name that you chose in the second step. This is also the URL of your website.

Note

For testing purposes, you can of course also leave the markdown code in its present form – your start page is identical to the Theme Demo Page.

Step 5: Add you own content

If the setup has worked as described in the previous steps, you can continue designing your blog or website. All the files you need for this purpose, such as CSS sheets or JavaScript codes, can be created using the 'Create new file' button. This way, you can also create ad­di­tion­al sub-pages for your web project. Via 'Upload files', it is also possible to upload files directly. You can either specify the location or drag and drop the file you want to insert.

Note

Since you have connected your repos­i­to­ry to Deploy Now, any changes to the files are au­to­mat­i­cal­ly trans­ferred to your site.

Step 6: Download desktop client or Terminal tool

Desktop Client

It is possible to manage a Jekyll website com­plete­ly via the GitHub web interface. With the desktop client, which is available for Windows and macOS as already mentioned, there is also an offline solution. If you have not yet installed it, simply click on the button “Set up in Desktop” in the created repos­i­to­ry and you will au­to­mat­i­cal­ly be taken to the download page.

Terminal Tool

For many de­vel­op­ers, taking a detour via the desktop client is an unpopular option. GitHub’s own Terminal Tool, which can be used to execute GitHub commands directly in the command line, is a solution to this end. All GitHub functions can be executed directly in the terminal using the handy tool and a few simple commands.

Step 7: Clone a repos­i­to­ry

After you have down­loaded and installed the client, you can use it to make a local copy of your website. To do this, simply log in with your GitHub login and select the entry 'Clone a repos­i­to­ry' from the start menu. You now have the option of spec­i­fy­ing which repos­i­to­ry you want to clone. The storage location can be specified under 'Local path'.

You can access different branches in your repos­i­to­ry. These are in­di­vid­ual branches in the project that allow de­vel­op­ers to work on the code si­mul­ta­ne­ous­ly or to focus on specific de­vel­op­ment areas sep­a­rate­ly. IONOS Deploy Now displays the in­di­vid­ual branches of the cloned repos­i­to­ry. As soon as you create a new branch, it is au­to­mat­i­cal­ly displayed using Deploy Now. This way you can always keep an eye on your entire web project and the progress within the in­di­vid­ual de­vel­op­ment branches.

Go to Main Menu