contrib/nitiwiki: fixes nitiwiki warnings
authorAlexandre Terrasa <alexandre@moz-code.org>
Tue, 30 Dec 2014 15:30:58 +0000 (16:30 +0100)
committerAlexandre Terrasa <alexandre@moz-code.org>
Tue, 30 Dec 2014 15:30:58 +0000 (16:30 +0100)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

contrib/nitiwiki/src/wiki_base.nit
contrib/nitiwiki/src/wiki_html.nit

index d5db709..3dec44f 100644 (file)
@@ -54,6 +54,7 @@ class Nitiwiki
                sys.system "rsync -vr --delete {root}/ {config.rsync_dir}"
        end
 
+       # Pull data from git repository.
        fun fetch do
                sys.system "git pull {config.git_origin} {config.git_branch}"
        end
@@ -211,6 +212,9 @@ class Nitiwiki
                return path.simplify_path
        end
 
+       # Transform an id style name into a pretty printed name.
+       #
+       # Used to translate ids in beautiful page names.
        fun pretty_name(name: String): String do
                name = name.replace("_", " ")
                name = name.capitalized
index 266e1d9..7f213b7 100644 (file)
@@ -110,7 +110,7 @@ redef class WikiSection
                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
@@ -322,11 +322,6 @@ class WikiSectionIndex
        # The section described by `self`.
        var section: WikiSection
 
-       init(wiki: Nitiwiki, section: WikiSection) do
-               super(wiki, "index")
-               self.section = section
-       end
-
        redef var is_dirty = false
 
        redef fun tpl_article do
@@ -341,11 +336,19 @@ end
 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