Class: Alula::Content::Post

Inherits:
Item
  • Object
show all
Defined in:
lib/alula/contents/post.rb

Instance Attribute Summary

Attributes inherited from Item

#metadata, #name, #site

Instance Method Summary collapse

Methods inherited from Item

#<=>, #body, #content, #current_locale, #current_locale=, #description, #exists?, #extension, #filepath, #flush, #flush_render, has_payload, has_payload?, #has_payload?, #id, #initialize, #inspect, #layout, load, #markdown, #method_missing, #next, #path, #previous, #render, #sidebar, #substitude, #substitutes, #url, #view, #write

Constructor Details

This class inherits a constructor from Alula::Content::Item

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Alula::Content::Item

Instance Method Details



8
9
10
11
# File 'lib/alula/contents/post.rb', line 8

def navigation(locale = nil)
  locale ||= self.current_locale || self.site.config.locale
  @navigation[locale] ||= self.site.content.posts.select { |item| item.languages.include?(locale) }        
end