ni_nitdoc: class to generate modules page
authorStefan Lage <lagestfan@gmail.com>
Wed, 3 Jul 2013 19:41:38 +0000 (15:41 -0400)
committerStefan Lage <lagestfan@gmail.com>
Wed, 3 Jul 2013 20:54:22 +0000 (16:54 -0400)
Adding a class to be the module page template

Signed-off-by: Stefan Lage <lagestfan@gmail.com>

src/ni_nitdoc.nit

index c59f300..89ae703 100644 (file)
@@ -379,9 +379,28 @@ class NitdocFullindex
 
 end
 
+class NitdocModules
+       super NitdocPage
+
+       var amodule: AModule
+       var modulename: String
+       init with(amodule: AModule) do
+               self.amodule = amodule
+               self.modulename = self.amodule.mmodule.name
+               opt_nodot = false
+               destinationdir = ""
+       end
+
+       redef fun head do
+               super
+               add("title").text("{modulename} module | {amodule.short_comment}")
+       end
+
+end
+
 class NitdocPage
        super HTMLPage
-
+       
        var opt_nodot: Bool
        var destinationdir : String