11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/jekyll/webmention_io/js_handler.rb', line 11
def render
if WebmentionIO.config.js.disabled?
WebmentionIO.log 'info',
'JavaScript output is disabled, so the {% webmentions_js %} tag is being skipped'
return ''
end
js_file = WebmentionIO.config.js.deploy? ? "<script src=\"#{WebmentionIO.config.js.resource_url}\" async></script>" : ''
WebmentionIO.log 'info', 'Gathering templates for JavaScript.'
"#{js_file}\n#{WebmentionIO.templates.html_templates}"
end
|