Home > Shopify Development > Generate an XML Sitemap for a Jekyll site

How to generate an XML Sitemap for a Jekyll site in Shopify

Sam Nguyen
Sam Updated: February 27, 2024

Share:

Drive 20-40% of your revenue with Avada
avada email marketing

You may know that Sitemap is very important in SEO for any websites. So what is a sitemap exactly and why you need it?

A sitemap is known as a file in which you are capable of listing the web pages to tell Google and many other search engines about the organization of your site content. Search engine web crawlers such as Googlebot read this file to crawl your website more intelligently.

Actually, there are a couple of different kinds of sitemaps such as a visual one which you are able to create before building a website, but in this instruction, we are going to focus on the one that is considered important for SEO. In details, it is known as an XML sitemap and it is just a list of the pages on your website. Imagine it is a map for your website, the fact is that it can show all the information on your webpages.

However, please keep reading our instructional writing on How to generate an XML Sitemap for a Jekyll site to know more deeply about this topic.

How to generate an XML Sitemap for a Jekyll site

What is a Sitemap?

A sitemap is an XML file that allows listing all the existing links on URL, a model of a website’s content which was designed to help both search engines and users navigate the site. As explained above, a sitemap can be a hierarchical list of pages (with links, as usual) that are organized by the topic, an XML document which provides instructions to search engine crawl bots, or an organization chart. For users, a sitemap is just a plain HTML file with a listing of many major pages on a website. For search engines, it is known as a sitemap.xml file that could help search engine crawlers index all pages on the site. Particularly, sitemaps are very important for sites that use JavaScript or Adobe Flash menus which do not contain HTML links.

It can help the search engine to crawl the URL of the website strategically. Sitemaps are considered an essential feature in doing SEO for any website. A perfect SEO strategy should include a sitemap that crawls all new and uploaded links or pages.

Way to create an XML Sitemap for your Jekyll site

It is very easy to generate a sitemap on your Jekyll site with the jekyll-sitemap plugin.

Installation

  • Step 1: Create a Gemfile if you do not already have one.

  • Step 2: Add jekyll-sitemap to the jekyll_plugins group in your Gemfile:

source 'https://rubygems.org'

gem 'jekyll', '3.3.1'

group :jekyll_plugins do
  gem 'jekyll-sitemap'
end
  • Step 3: Run bundle install.

Configuration

Exclude

You are able to exclude particular pages from the sitemap by setting sitemap to false in the front mater.

sitemap: true

Last modified

You are able to set the last modified date in the front matter of a post using last_modified_at.

last_modified_at: 2017-02-09

Usage

The sitemap will automatically be generated by jekyll-sitemap at /sitemap.xml.

Conclusion

We hope that now you have known exactly what a Sitemap is and how to install it!


Sam Nguyen is the CEO and founder of Avada Commerce, an e-commerce solution provider headquartered in Singapore. He is an expert on the Shopify e-commerce platform for online stores and retail point-of-sale systems. Sam loves talking about e-commerce and he aims to help over a million online businesses grow and thrive.

Stay in the know

Get special offers on the latest news from AVADA.