15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# File 'lib/jekyll-wikilinks/plugins/generator.rb', line 15
def generate(site)
return if $wiki_conf.disabled?
@site ||= site
@context ||= Jekyll::WikiLinks::Context.new(site)
@parser = Parser.new(@site)
@site.link_index = LinkIndex.new(@site)
@site.doc_mngr.all.each do |doc|
filename = File.basename(doc.basename, File.extname(doc.basename))
@parser.parse(filename, doc.content)
@site.link_index.populate(doc, @parser.wikilink_blocks, @parser.wikilink_inlines)
end
@site.doc_mngr.all.each do |doc|
@site.link_index.assign_metadata(doc)
end
end
|