GitHub Enterprise Pages can automatically create sitemaps for your projects.
GitHub Enterprise Pages will not override a sitemap.xml file that exists in the root of your repository.
Setting up
To enable automatic sitemap generation, you must add the following line to your site's _config.yml
file:
gems:
- jekyll-sitemap
If you don't have a _config.yml
file, you will need to create one in the root of your GitHub Enterprise Pages repository. For more information, see the Jekyll documentation.
The GitHub Pages website lists the exact versions of the plugins used by the GitHub Enterprise Pages server.
Testing locally
To preview the output of your sitemap locally:
- Add
jekyll-sitemap
to your site's_config.yml
file - Make sure you're using the latest version of the GitHub Pages Gem
You should see a new sitemap.xml file generated in your Jekyll _site folder.
For more information, see The Jekyll Sitemap Gem.