Running bundle exec jekyll serve on my local machine builds the site, and I can find the sitemap normally at localhost:4000/sitemap.xml (meaning it is definitely inside the _site directory).
However, after pushing the site to Github Pages, I can't find sitemap.xml, at least not in the root directory.
Gemfile:
# frozen_string_literal: true
source "https://rubygems.org"
gem 'github-pages', group: :jekyll_plugins
gem 'jekyll-sitemap'
gem "webrick", "~> 1.7"
_config.yml:
# Build settings
theme: jekyll-theme-midnight
plugins:
- jekyll-feed
- jekyll-remote-theme
- jekyll-sitemap
Just tested it in my project and it works. Try to move the gem into
:jekyll_pluginsgroup. Here is my Gemfile:But it also worked without putting it into the group, as described in the docs