16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
# File 'lib/jekyll/generators/queue_webmentions.rb', line 16
def generate(site)
@site = site
@site_url = site.config["url"].to_s
if @site_url.include? "localhost"
WebmentionIO.log "msg", "Webmentions lookups are not run on localhost."
return
end
if @site.config.dig("webmentions", "pause_lookups")
WebmentionIO.log "info", "Webmention lookups are currently paused."
return
end
WebmentionIO.log "msg", "Beginning to gather webmentions you’ve made. This may take a while."
upgrade_outgoing_webmention_cache
posts = WebmentionIO.gather_documents(@site)
gather_webmentions(posts)
end
|