Class: JekyllNotion::DocumentWithoutAFile
- Inherits:
-
Jekyll::Document
- Object
- Jekyll::Document
- JekyllNotion::DocumentWithoutAFile
- Defined in:
- lib/jekyll-notion/document_without_a_file.rb
Instance Method Summary collapse
Instance Method Details
#read_content(**_opts) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/jekyll-notion/document_without_a_file.rb', line 5 def read_content(**_opts) if content =~ YAML_FRONT_MATTER_REGEXP self.content = Regexp.last_match.post_match data_file = SafeYAML.load(Regexp.last_match(1)) merge_data!(data_file, :source => "YAML front matter") if data_file end end |