3 Building a blog

 

This chapter covers

  • Using a static site generator to build a blog
  • How to install and make use of Jekyll
  • Creating a basic blog with Jekyll

Blogs are one of the most popular forms of websites on the internet, with over 75 million people alone using the WordPress platform. A blog is typically fairly simple in structure but highly personal in nature. Much like a diary, a blog lists posts in chronological order, typically presented with the newest first on the home page. Blogs will often have categories and tags as a way to categorize and organize content, letting readers quickly find related content to a particular post.

In this chapter, we will focus on building a blog with the Jamstack. The static site generator we will use builds a blog by default, so a lot of work will be done for us, which leaves us more time to focus on customization of the blog theme (how it looks) and other aspects.

3.1 Blogging with Jekyll

Jekyll (jekyllrb.com) is a static site generator that is specifically tailored toward blogs (figure 3.1). While you can definitely build other types of sites with Jekyll (and build blogs with other generators), you’ll find Jekyll really shines when building a Jamstack blog. Jekyll is what powers GitHub Pages web pages, which can be incredibly useful for people already using GitHub for their projects.

Figure 3.1 The Jekyll website (jekyllrb.com)
CH03_F01_Camden2

3.2 Your first Jekyll site

3.3 Writing a Jekyll post

3.3.1 A liquid refresher

3.4 Working with layouts and includes

3.4.1 Layout inheritance

3.4.2 Using includes

3.5 Creating additional files

3.6 Working with data

3.7 Configuring your Jekyll blog

3.8 Generating your site

3.9 Building a Jekyll blog

3.10 Going further with Jekyll

Summary