Module: Jekyll::Share::Helper

Included in:
Group, Single
Defined in:
lib/jekyll/share/helper.rb

Overview

Contains the methods to calculate the Disqus ID associated to a post or a page.

Instance Method Summary collapse

Instance Method Details

#extract_page_data(context) ⇒ Object



14
15
16
# File 'lib/jekyll/share/helper.rb', line 14

def extract_page_data(context)
  extract_data "page", context
end

#extract_preview_data(context) ⇒ Object



18
19
20
# File 'lib/jekyll/share/helper.rb', line 18

def extract_preview_data(context)
  extract_data Config.post_selector, context
end

#preview?(context) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/jekyll/share/helper.rb', line 10

def preview?(context)
  return true if context["#{Config.post_selector}.title"]
end