Generates sitemap for your spree project based on dynamic_sitemaps
- Add this extension to your Gemfile with this line:
gem 'spree_simple_sitemap', git: 'https://github.com/SValkanov/spree_simple_sitemap', branch: '3-1-stable'
- Install the gem using Bundler:
bundle install
- Generate initializers
bundle exec rails g spree_simple_sitemap:install
This generates '/config/sitemap.rb' with default sitemap for Image and Product. For more option see dynamic_sitemaps. Also it adds to your whenever ('/config/schedule.rb') file options for sitemap generate and compress.
- Add path to your robots.txt
Add line to your '/public/robots.txt'
Sitemap: http://localhost:3000/sitemaps/sitemap.xml.gz
- Restart your server
If your server was running, restart it so that it can find the assets properly.
Copyright (c) 2017 Stanislav Valkanov, released under the New BSD License