Sitemaped is a powerful parser for XML sitemaps which respects all sitemaps listed in robots.txt and handles gziped and nested sitemaps as well.
- Respects sitemaps listed in robots.txt
- Handles gziped sitemaps
- Supports nested sitemaps (sitemap of sitemaps)
Just add to your Gemfile
gem 'sitemaped'If you're not using Bundler just execute on your commandline
$ gem install sitemapedrequire 'sitemaped'
website = Sitemaped.new('http://www.example.com')
sitemap = website.sitemap # => ["http://www.example.com/", "http://www.example.com/contact", ...]require 'sitemaped'
sitemap = Sitemaped.new('http://www.example.com')
sitemap.include?('http://www.example.com/contact') # => true or false- Add tests