Project

sitemaped

0.0
No commit activity in last 3 years
No release in over 3 years
Parser for XML sitemaps which respects sitemaps listed in robots.txt and handles gziped and nested sitemaps as well.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.6
>= 0

Runtime

~> 1.6
 Project Readme

Sitemaped

Sitemaped is a powerful parser for XML sitemaps which respects all sitemaps listed in robots.txt and handles gziped and nested sitemaps as well.

Features

  • Respects sitemaps listed in robots.txt
  • Handles gziped sitemaps
  • Supports nested sitemaps (sitemap of sitemaps)

Installation

With Bundler

Just add to your Gemfile

gem 'sitemaped'

Without Bundler

If you're not using Bundler just execute on your commandline

$ gem install sitemaped

Usage

Get a list of all URLs covered by the sitemap(s)

require 'sitemaped'

website = Sitemaped.new('http://www.example.com')
sitemap = website.sitemap  # => ["http://www.example.com/", "http://www.example.com/contact", ...]

Check whether an URL is covered by the sitemap

require 'sitemaped'

sitemap = Sitemaped.new('http://www.example.com')
sitemap.include?('http://www.example.com/contact') # => true or false

Todo

  • Add tests