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
16 def self.call(context)
17   context.website.ext.tag.replace_tags(context.content) do |tag, params, body|
18     context.website.logger.debug do
19       "Replacing tag #{tag} with data #{params.inspect} and body '#{body}' in <#{context.ref_node}>"
20     end
21     context.website.ext.tag.call(tag, params, body, context)
22   end
23   context
24 end