Class: Jekyll::Podcast::PageTitleTag
- Inherits:
-
Liquid::Tag
- Object
- Liquid::Tag
- Jekyll::Podcast::PageTitleTag
- Defined in:
- lib/jekyll/podcast/page_title_liquid_tag.rb
Overview
Liquid tag for generating a page title
Instance Method Summary collapse
Instance Method Details
#render(context) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/jekyll/podcast/page_title_liquid_tag.rb', line 7 def render(context) site_title = context.registers[:site].config['title'] page_title = context.registers[:page]['title'] if page_title.nil? || page_title.empty? || page_title == site_title "<title>#{site_title}</title>" else "<title>#{page_title} — #{site_title}</title>" end end |