优化rails的SEO相关教程
Start Your SEO Right with Sitemaps on Rails
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | def initialize(options={}) @default_host, @sitemaps_host, @yield_sitemap, @sitemaps_path, @adapter, @verbose, @protect_index, @sitemap_index, @added_default_links, @created_group, @sitemap = nil options = SitemapGenerator::Utilities.reverse_merge(options, :include_root => true, :include_index => false, :filename => :sitemap, :search_engines => { :google => "http://www.google.com/webmasters/tools/ping?sitemap=%s", :bing => "http://www.bing.com/ping?sitemap=%s" }, :create_index => :auto, :compress => true, :max_sitemap_links => SitemapGenerator::MAX_SITEMAP_LINKS ) options.each_pair { |k, v| instance_variable_set("@#{k}".to_sym, v) } # If an index is passed in, protect it from modification. # Sitemaps can be added to the index but nothing else can be changed. if options[:sitemap_index] @protect_index = true end end |
使用 Friendly_id 與 Babosa 美化你的Rails 網址
直接把你写的文章链接放到百度里面搜索:如果出现如图下的 就表明被百度收录了