SEO

Introduction

In this tutorial we’ll go over techniques to improve the search engine optimization of our demo Bakery Store site.

Jekyll SEO Tag Plugin

The jekyll-seo-tag plugin is the best way to set all the meta tags we need for SEO. We add a {% seo %} Liquid tag in our <head>. Then in the page front matter we can set title, description, image and many other options which output as <title>, <meta name="description">, Open Graph tags and JSON-LD. Open Graph allows us to control how content is displayed when it’s shared on Facebook, Twitter, Pinterest and other social networks. JSON-LD helps Google and other search engines display your content in search results.

Facebook’s Sharing Debugger is a useful tool for previewing what content will look like when it’s shared.

Facebook Open Graph Debugger

Here’s more information on creating SEO friendly title tags and description tags.

Structured URLs

With permalinks, we can control how Jekyll builds site URLs. Head over to our permalink tutorial to review how they work. Google recommends using descriptive keywords in the URL.

Moz has a great URL guide to help you create SEO friendly URLs.

Sitemap

Sitemaps help search engines find content on your site. We can generate a sitemap using the jekyll-sitemap plugin or David Ensinger has a useful Liquid script.

For more information check out Google’s sitemap documentation.

Custom 404 Pages

Custom 404 Pages in Jekyll can help users navigate our site if they’ve gone to a page which doesn’t exist. GitHub Pages, CloudCannon and the Jekyll Server will show 404.html (if the file exists) when they can’t find a page. Other services may require configuration to get custom 404 pages working.

Have a look at 404 page best practices to help create useful 404 pages for your visitors.

Other Resources

This should be enough to get you started with SEO on Jekyll. Here are some other useful links to continue your learning.