Are you happy with your logging solution? Would you help us out by taking a 30-second survey? Click here

jekyll-sitemap

Jekyll plugin to silently generate a sitemaps.org compliant sitemap for your Jekyll site

Subscribe to updates I use jekyll-sitemap


Statistics on jekyll-sitemap

Number of watchers on Github 461
Number of open issues 4
Average time to close an issue about 1 month
Main language Ruby
Average time to merge a PR 13 days
Open pull requests 7+
Closed pull requests 19+
Last commit over 1 year ago
Repo Created over 5 years ago
Repo Last Updated over 1 year ago
Size 265 KB
Homepage http://rubygems.o...
Organization / Authorjekyll
Latest Releasev1.2.0
Contributors17
Page Updated
Do you use jekyll-sitemap? Leave a review!
View open issues (4)
View jekyll-sitemap activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating jekyll-sitemap for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

Jekyll Sitemap Generator Plugin

Jekyll plugin to silently generate a sitemaps.org compliant sitemap for your Jekyll site

Build Status

Usage

  1. Add gem 'jekyll-sitemap' to your site's Gemfile and run bundle
  2. Add the following to your site's _config.yml:
url: "http://example.com" # the base hostname & protocol for your site
plugins:
  - jekyll-sitemap

If you are using a Jekyll version less than 3.5.0, use the gems key instead of plugins.

If all gem plugins have the same priority, they will be executed in the order they are required, generally. Thus, if you have other plugins which generate content and store that content in site.pages, site.posts, or site.collections, be sure to require jekyll-sitemap either after those other gems if you want the sitemap to include the generated content, or before those other gems if you don't want the sitemap to include the generated content from the gems. (Programming is hard.)

Because the sitemap is added to site.pages, you may have to modify any templates that iterate through all pages (for example, to build a menu of all of the site's content).

Note on Use with GitHub Pages Gem

The GitHub Pages gem ignores all plugins included in the Gemfile. If you only include jekyll-sitemap in the Gemfile without also including it in the _config.yml the plugin will not work. This can be confusing because the official Jekyll docs state that plugins can be included in either the Gemfile or _config.yml.

When building a site that uses the GitHub Pages gem, follow the instructions above and ensure that jekyll-sitemap is listed in the plugins array in _config.yml.

:warning: If you are using Jekyll < 3.5.0 use the gems key instead of plugins.

<lastmod> tag

The <lastmod> tag in the sitemap.xml will reflect by priority:

  1. The modified date of the file as reported by the filesystem if you have jekyll-last-modified-at plugin installed (not compatible with GitHub Pages auto building)
  2. A personalised date if you add the variable last_modified_at: with a date in the Front Matter
  3. The creation date of your post (corresponding to the post.date variable)

Exclusions

If you would like to exclude specific pages/posts from the sitemap set the sitemap flag to false in the front matter for the page/post.

sitemap: false

Override default development settings

Follow these instructions on Jekyll's documentation.

Developing locally

  • Use script/bootstrap to bootstrap your local development environment.
  • Use script/console to load a local IRB console with the Gem.

Testing

  1. script/bootstrap
  2. script/cibuild

Known Issues

  1. If the sitemap.xml doesn't generate in the _site folder, ensure _config.yml doesn't have safe: true. That prevents all plugins from working.
  2. If the sitemap.xml doesn't generate in the _site folder, ensure that you don't have a sitemap generator plugin in your _plugin folder.

Contributing

  1. Fork the project
  2. Create a descriptively named feature branch
  3. Add your feature
  4. Submit a pull request
jekyll-sitemap open issues Ask a question     (View All Issues)
  • almost 3 years Invalid Date when using drafts
  • almost 3 years has-pull-request label?
  • almost 3 years Feature request: <changefreq> tag support
  • over 3 years Version 1.0.0
  • over 3 years Ability to exclude individual PDF files from sitemap.xml
  • over 3 years robots.txt
jekyll-sitemap open pull requests (View All Pulls)
  • Allow for the inclusion of static files
  • Do not override site.time
  • Use filters to clean up Liquid template
  • DRY in sitemap.xml
  • Allow Travis to build tags
  • Condition the static file tests on Jekyll 3.4.2 and above
  • Support per-page/post sitemap tags
jekyll-sitemap questions on Stackoverflow (View All Questions)
  • Jekyll sitemap exclude not working
  • Error with jekyll-sitemap when run rake generate to user jekyll with octopuses
jekyll-sitemap list of languages used
jekyll-sitemap latest release notes
v1.2.0 v1.2.0

Minor Enhancements

  • Remove excluded static files from the sitemap (#166)
  • filter/replace static index.html paths to permalink (#170)

Development Fixes

  • Condition the static file tests on Jekyll 3.4.2 and above (#167)
  • Update versions for Travis (#174)
  • Fix Travis Deploy (#173)
  • Test against Jekyll 3.4.x and latest 3.x (#177)
  • Define path with dir (#186)
  • Style: Rubocop auto-correct (#195)
  • Test against Ruby 2.5 (#201)

Documentation

  • Add note about use with Github Pages gem (#179)
  • Fix a couple of typos (#184)
  • Use plugins instead of gems in README config (#185)
  • Docs: set site.url in config (#172)
v1.1.1 v1.1.1
  • Cut a new version to alleviate sha256 checksum issue on RubyGems.org (#165)
v1.1.0

Minor Enhancements

  • escape& (#162)
  • feat: remove 404 pages from the sitemap. closes #113 (#164)
Other projects in Ruby