blog github-pages

This article is is about adding a site map to a Jekyll website using the Jekyll Sitemap Generator Plugin.

Reference

Environment

  • Jekyll 4.3.3

Workflow to Set Up Site Map

  1. Update Gemfile
  2. Update Config
  3. Verify Generated Site Map

1. Update Gemfile

Add the following to your Gemfile.

gem 'jekyll-sitemap'

Note: GitHub Pages doesn’t use your Gemfile. According to Dependency versions, it uses jekyll-sitemap version 1.4.0.

2. Update Config

Add the following to your _config.yml.

url: "https://example.com" # the base hostname & protocol for your site
plugins:
  - jekyll-sitemap

3. Verify Generated Site Map

Once the site is built, you can access the generated site map at https://example.com/sitemap.xml. Replace https://example.com with your hostname and protocol.