Sha256: 21a15a638a17ea807e92a67934776e51832dd9cee6e56a1e20005a99510d80e5
Contents?: true
Size: 568 Bytes
Versions: 4
Compression:
Stored size: 568 Bytes
Contents
module Enki module PageTitleHelper def posts_title(tag) compose_title((tag || "").to_s.titleize) end def post_title(post) compose_title(post.title) end def archives_title compose_title("Archives") end def page_title(page) compose_title(page.title) end def html_title(content) if content.present? content else Enki.config[:title] end end private def compose_title(*parts) (parts << Enki.config[:title]).reject(&:blank?).join(" - ") end end end
Version data entries
4 entries across 4 versions & 1 rubygems