Sha256: cb73ca728c8395501bc34649d8888689366082a866f06926c5d9720484507682

Contents?: true

Size: 684 Bytes

Versions: 11

Compression:

Stored size: 684 Bytes

Contents

# config/sitemap.rb
SitemapGenerator::Sitemap.default_host = ENV['HOST']
SitemapGenerator::Sitemap.adapter = SitemapGenerator::WaveAdapter.new
SitemapGenerator::Sitemap.sitemaps_host = "#{ENV["AWS_ASSET_HOST"]}/#{ENV['S3_BUCKET_NAME']}/#{ENV["S3_BUCKET_NAME"]}"
SitemapGenerator::Sitemap.public_path = Rails.root.join('tmp')
SitemapGenerator::Sitemap.sitemaps_path = "sitemaps/#{Rails.application.class.to_s.split('::').first}"


SitemapGenerator::Sitemap.create do
  # add '/contact', 'changefreq': 'weekly'
  Hicube::Page.all.each do |page|
    add "/#{page.slug}", lastmod: page.updated_at
  end
end

# Not needed if rake task is used
#SitemapGenerator::Sitemap.ping_search_engines

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
hicube-0.0.11 lib/generators/hicube/install/templates/sitemap.rb
hicube-0.0.10 lib/generators/hicube/install/templates/sitemap.rb
hicube-0.0.9 lib/generators/hicube/install/templates/sitemap.rb
hicube-0.0.8 lib/generators/hicube/install/templates/sitemap.rb
hicube-0.0.7 lib/generators/hicube/install/templates/sitemap.rb
hicube-0.0.6 lib/generators/hicube/install/templates/sitemap.rb
hicube-0.0.5 lib/generators/hicube/install/templates/sitemap.rb
hicube-0.0.4 lib/generators/hicube/install/templates/sitemap.rb
hicube-0.0.3 lib/generators/hicube/install/templates/sitemap.rb
hicube-0.0.2 lib/generators/hicube/install/templates/sitemap.rb
hicube-0.0.1 lib/generators/hicube/install/templates/sitemap.rb