class Webgen::Context::HtmlHead::Proxy

Proxy object for working with the data structure needed by Webgen::ContentProcessor::HtmlHead.

Public Instance Methods

inline_fragment(type, content) click to toggle source

Add inline CSS or JS fragments to the HTML head section.

The type can either be :css for a CSS fragment or :js for a javascript fragment.

   # File lib/webgen/context/html_head.rb
44 def inline_fragment(type, content)
45   type_check!(type)
46   (cp_hash["#{type}_inline".intern] ||= []) << content
47 end
meta(name, content) click to toggle source

Set the meta tag to the provided value.

Note that some meta information keys may not be specified multiple times!

   # File lib/webgen/context/html_head.rb
21 def meta(name, content)
22   (cp_hash[:meta] ||= {})[name] = content
23 end
meta_property(name, content) click to toggle source

Set the meta tag to the provided value, using property instead of name.

Note that some meta information keys may not be specified multiple times!

   # File lib/webgen/context/html_head.rb
28 def meta_property(name, content)
29   (cp_hash[:meta_property] ||= {})[name] = content
30 end