fun url: String do return wiki.config.root_url.join_path(breadcrumbs.join("/"))
# Get a `<a>` template link to `self`
- fun tpl_link: Streamable do
+ fun tpl_link: Writable do
return "<a href=\"{url}\">{title}</a>"
end
end
end
# Generate the HTML header for this article.
- fun tpl_header: Streamable do
+ fun tpl_header: Writable do
var file = header_file
if not wiki.has_template(file) then return ""
return wiki.load_template(file)
# Generate the HTML summary for this article.
#
# Based on `headlines`
- fun tpl_summary: Streamable do
+ fun tpl_summary: Writable do
var headlines = self.headlines
var tpl = new Template
tpl.add "<ul class=\"summary list-unstyled\">"
end
# Generate the HTML menu for this article.
- fun tpl_menu: Streamable do
+ fun tpl_menu: Writable do
var file = menu_file
if not wiki.has_template(file) then return ""
var tpl = wiki.load_template(file)
end
# Generate the HTML footer for this article.
- fun tpl_footer: Streamable do
+ fun tpl_footer: Writable do
var file = footer_file
if not wiki.has_template(file) then return ""
var tpl = wiki.load_template(file)
super Template
# Article title.
- var title: nullable Streamable = null
+ var title: nullable Writable = null
# Article HTML body.
- var body: nullable Streamable = null
+ var body: nullable Writable = null
# Sidebar of this article (if any).
var sidebar: nullable TplSidebar = null
var breadcrumbs: nullable TplBreadcrumbs = null
# Init `self` with a `title`.
- init with_title(title: Streamable) do
+ init with_title(title: Writable) do
self.title = title
end
super Template
# Blocks are `Stremable` pieces that will be rendered in the sidebar.
- var blocks = new Array[Streamable]
+ var blocks = new Array[Writable]
redef fun rendering do
for block in blocks do