Permalink
Browse files

add a sitemap generator, link from robots

  • Loading branch information...
birarda committed Sep 11, 2016
1 parent bc6e193 commit b2c1bfc3463b8caf18bacdb6c98c19e16fe96412
Showing with 40 additions and 0 deletions.
  1. +3 −0 Gemfile
  2. +3 −0 Gemfile.lock
  3. +32 −0 config/sitemap.rb
  4. +2 −0 public/robots.txt
View
@@ -75,6 +75,9 @@ gem 'aws-sdk', '~> 2.3.0'
# add whenever to trigger database backup
gem 'whenever', require: false
# add SitemapGenerator for better search indexing
gem 'sitemap_generator'
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platform: :mri
View
@@ -270,6 +270,8 @@ GEM
tilt (>= 1.1, < 3)
selectize-rails (0.12.3)
shellany (0.0.1)
sitemap_generator (5.1.0)
builder
skylight (0.10.6)
activesupport (>= 3.0.0)
slim (3.0.6)
@@ -356,6 +358,7 @@ DEPENDENCIES
ruby_gntp
sass-rails (~> 5.0)
selectize-rails
sitemap_generator
skylight
slim
spring
View
@@ -0,0 +1,32 @@
# Set the host name for URL creation
SitemapGenerator::Sitemap.default_host = "https://greatpass.io"
SitemapGenerator::Sitemap.create do
# Put links creation logic here.
#
# The root path '/' and sitemap index file are added automatically for you.
# Links are added to the Sitemap in the order they are specified.
#
# Usage: add(path, options={})
# (default options are used if you don't specify)
#
# Defaults: :priority => 0.5, :changefreq => 'weekly',
# :lastmod => Time.now, :host => default_host
#
# Examples:
#
# Add '/articles'
#
# add articles_path, :priority => 0.7, :changefreq => 'daily'
#
# Add all articles:
#
# Article.find_each do |article|
# add article_path(article), :lastmod => article.updated_at
# end
# Add all item pages
Item.find_each do |item|
add item_path(item_slug: item.url_slug), lastmod: item.updated_at
end
end
View
@@ -3,3 +3,5 @@
# To ban all spiders from the entire site uncomment the next two lines:
# User-agent: *
# Disallow: /
Sitemap: https://greatpass.io/sitemap.xml.gz

0 comments on commit b2c1bfc

Please sign in to comment.