struct Creestal::Core::Resources::FrontMatter

Included Modules

Defined in:

core/resources/page.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(ctx : YAML::ParseContext, node : YAML::Nodes::Node) #

[View source]

Instance Method Detail

def date : Time | Nil #

[View source]
def draft : Bool | Nil #

[View source]
def layout : String | Nil #

Stored as nilable so YAML::Serializable can deserialize an absent or explicit-null field without raising. Callers should use #resolved_layout, which always returns a non-nil String.


[View source]
def resolved_layout : String #

Returns the declared layout name, falling back to DEFAULT_LAYOUT when the field was absent or explicitly null in the front matter.


[View source]
def tags : Array(String) | Nil #

[View source]
def title : String #

[View source]