Module: Diary::Item::Template

Included in:
Page, Post
Defined in:
lib/diary/item/template.rb

Instance Method Summary collapse

Instance Method Details

#templateObject

This method will go down the template lookup procedure and will return the first file path to match an existing file.

The lookup order is as follow:

1 The template name supplied in the data section
2 A template with the same basename
3 A template with the name of the item class (Page, Post, etc…)
4 The index template file


13
14
15
16
17
# File 'lib/diary/item/template.rb', line 13

def template
  Diary.message :invoke, template_lookup, :cyan

  template_lookup
end