Open komor72 opened 6 years ago
A workaround for this behavious can be easily implemented using the exclude_if
option:
activate :search_engine_sitemap, default_change_frequency: "weekly", exclude_if: ->(resource) {
resource.source_file.nil?
}
The reason is that dynamically generated redirects have no source_file
attributes (proxies do have source_file
set to proxy template source file). If you guys think this is enough, then we can close this issue. But maybe it would helpful to think, what's right.
Hey, sorry @komor72. I'm not maintaining this any more. It's been a few years since I used it myself, and I've lost touch with what's happening inside the Middleman codebase.
Hello again. :) Just found another side-effect. Redirects created in
config.rb
like:do get included in sitemap (which is probably fine?), but the Middleman includes a "noindex, follow" metatag in generated HTML code:
which is being considered as an error by Google Search. Anybody has an opinion on which is better: disable redirects being added to sitemap, or changing the Middleman template HTML-code for redirects? Or create a new config option in middleman-search_engine_sitemap?