Class: Jekyll::Mentions
- Inherits:
-
Generator
- Object
- Generator
- Jekyll::Mentions
- Defined in:
- lib/jekyll-mentions.rb
Constant Summary collapse
- URL =
"https://github.com"
Instance Method Summary collapse
- #generate(site) ⇒ Object
-
#initialize(site) ⇒ Mentions
constructor
A new instance of Mentions.
- #mentionify(page) ⇒ Object
Constructor Details
Instance Method Details
#generate(site) ⇒ Object
15 16 17 18 |
# File 'lib/jekyll-mentions.rb', line 15 def generate(site) site.pages.each { |page| mentionify page if page.html? } site.posts.each { |page| mentionify page } end |
#mentionify(page) ⇒ Object
20 21 22 23 |
# File 'lib/jekyll-mentions.rb', line 20 def mentionify(page) return unless page.content.include?('@') page.content = @filter.mention_link_filter(page.content) end |