X-Git-Url: http://nitlanguage.org diff --git a/src/nitcatalog.nit b/src/nitcatalog.nit index c843b51..21847ee 100644 --- a/src/nitcatalog.nit +++ b/src/nitcatalog.nit @@ -25,7 +25,7 @@ # * [X] generate a page per package with the readme and most metadata # * [ ] link/include/be included in the documentation # * [ ] propose `related packages` -# * [ ] show directory content (a la nitls) +# * [X] show directory content (a la nitls) # * [X] gather git information from the working directory # * [ ] gather git information from the repository # * [ ] gather package information from github @@ -33,7 +33,7 @@ # * [ ] reify people # * [ ] separate information gathering from rendering # * [ ] move up information gathering in (existing or new) service modules -# * [ ] add command line options +# * [X] add command line options # * [ ] harden HTML (escaping, path injection, etc) # * [ ] nitcorn server with RESTful API # @@ -86,6 +86,12 @@ class CatalogPage # Placeholder to include additional things before the ``. var more_head = new Template + # Relative path to the root directory (with the index file). + # + # Use "" for pages in the root directory + # Use ".." for pages in a subdirectory + var rootpath: String + redef init do add """ @@ -94,7 +100,7 @@ class CatalogPage
- + """ add more_head @@ -116,7 +122,7 @@ class CatalogPage @@ -238,11 +244,36 @@ class Catalog res.add "" end + # Recursively generate a level in the file tree of the *content* section + private fun gen_content_level(ot: OrderedTree[MConcern], os: Array[Object], res: Template) + do + res.add "