Class: Jekyll::WebmentionIO::GatherWebmentions

Inherits:
Generator
  • Object
show all
Defined in:
lib/jekyll/generators/gather_webmentions.rb

Instance Method Summary collapse

Instance Method Details

#generate(_ = nil) ⇒ Object



19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/jekyll/generators/gather_webmentions.rb', line 19

def generate(_ = nil)
  @caches = WebmentionIO.caches

  return if WebmentionIO.config.pause_lookups

  WebmentionIO.log 'msg', 'Beginning to gather webmentions of your posts. This may take a while.'

  WebmentionIO.config.documents.each do |post|
    check_for_webmentions(post)
  end

  @caches.site_lookups.write
  @caches.incoming_webmentions.write
end