Hwaro::Content::Processors::Wikilinks::Index
Page and file lookup for one page set. Read-only after construction except for the lazily built file index, behind the mutex (render workers share one index).
Constructors
new(pages : Enumerable(Models::Page), default_language : String, files_source : Proc(Array(Tuple(String, String))) = -> do
[] of ::Tuple(String, String)
end, warned : WarnLog = WarnLog.new)
files lists every published non-page file as
{relative path, URL}; it is only called on the first file link
that is not one of the source page's own bundle assets.
Class methods
The directory a page sits in: a bundle or section index counts as living beside its siblings, in its directory's parent.
{name, content path} a page answers to, lowercased: the file
stem without extension and language suffix (the directory name
for a bundle or section index), and the content-relative path
without them. nil for the root index.