module Webgen::ContentProcessor::Tags

Processes special webgen tags to provide dynamic content.

webgen tags are an easy way to add dynamically generated content to websites, for example menus or breadcrumb trails.

See Webgen::Tag and all the classes in its namespace for further information.

Public Class Methods

call(context) click to toggle source

Replace all webgen tags in the content of context with the rendered content.

# File lib/webgen/content_processor/tags.rb, line 16
def self.call(context)
  context.website.ext.tag.replace_tags(context.content) do |tag, params, body|
    context.website.logger.debug do
      "Replacing tag #{tag} with data #{params.inspect} and body '#{body}' in <#{context.ref_node}>"
    end
    context.website.ext.tag.call(tag, params, body, context)
  end
  context
end