Class: Stic::Metadata::HtmlYaml
- Defined in:
- lib/stic/metadata/html_yaml.rb
Overview
The HtmlYaml front matter parses YAML meta data from an HTML comment at the beginning of a page:
“‘ <!– title: An Example –><html>… “`
“‘ <!– title: An Example –> <html>… “`
Constant Summary collapse
- HTML_YAML_REGEXP =
/\A<!--\s*(?<data>.*?\n?)(-->\s*(\n|$)|^-->\s*\n?)(?<content>.*)\z/m
Constants inherited from Yaml
Instance Method Summary collapse
Methods inherited from Yaml
#match, #parse, #preprocess_content, #preprocess_data
Methods inherited from Parser
Instance Method Details
#regexp ⇒ Object
21 22 23 |
# File 'lib/stic/metadata/html_yaml.rb', line 21 def regexp HTML_YAML_REGEXP end |