end
var index = self.index
if index isa WikiSectionIndex then
+ wiki.message("Render auto-index for section {out_path}", 1)
index.is_dirty = true
add_child index
end
for child in children.values do
if child isa WikiArticle and child.is_index then return child
end
- return new WikiSectionIndex(wiki, self)
+ return new WikiSectionIndex(wiki, "index", self)
end
redef fun tpl_link do return index.tpl_link
# The section described by `self`.
var section: WikiSection
- init(wiki: Nitiwiki, section: WikiSection) do
- super(wiki, "index")
- self.section = section
- end
+ redef fun title do return section.title
+
+ redef fun url do return section.url
redef var is_dirty = false
class TplArticle
super Template
+ # Article title.
var title: nullable Streamable = null
+
+ # Article HTML body.
var body: nullable Streamable = null
+
+ # Sidebar of this article (if any).
var sidebar: nullable TplSidebar = null
+
+ # Breadcrumbs from wiki root to this article.
var breadcrumbs: nullable TplBreadcrumbs = null
+ # Init `self` with a `title`.
init with_title(title: Streamable) do
self.title = title
end