Sha256: 9e830ff5c9b71ca6361bd89691aa0f0569c532599477d6d25855fa53bd80c396
Contents?: true
Size: 775 Bytes
Versions: 6
Compression:
Stored size: 775 Bytes
Contents
module Middleman module Blog # A sitemap plugin that adds tag pages to the sitemap # based on the tags of blog articles. class TagPages def initialize(app) @app = app end # Update the main sitemap resource list # @return [void] def manipulate_resource_list(resources) resources + @app.blog.tags.map do |tag, articles| path = Middleman::Util.normalize_path(@app.tag_path(tag)) p = ::Middleman::Sitemap::Resource.new( @app.sitemap, path ) p.proxy_to(@app.blog.options.tag_template) p.add_metadata do @tag = tag @articles = articles end p end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems