From 27f99ccee9dfd1afddac4ba7bd3ba83084e62b3b Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Thu, 9 Jul 2015 11:44:41 -0400 Subject: [PATCH] nitiwiki: remove completely root_url as everything is now relative Signed-off-by: Jean Privat --- contrib/nitiwiki/README.md | 3 +-- contrib/nitiwiki/examples/default/config.ini | 1 - contrib/nitiwiki/examples/nitiwiki/config.ini | 1 - contrib/nitiwiki/src/wiki_base.nit | 7 ------- contrib/nitiwiki/src/wiki_links.nit | 4 ---- 5 files changed, 1 insertion(+), 15 deletions(-) diff --git a/contrib/nitiwiki/README.md b/contrib/nitiwiki/README.md index 1c764d4..77e0b56 100644 --- a/contrib/nitiwiki/README.md +++ b/contrib/nitiwiki/README.md @@ -108,7 +108,6 @@ Settings: * `wiki.name`: Displayed name * `wiki.desc`: Long description * `wiki.logo`: Logo image url -* `wiki.root_url`: Base url used to resolve links * `wiki.root_dir`: Absolute path of base directory * `wiki.source_dir`: Source directory (relative path from `wiki.root_dir`) * `wiki.out_dir`: Output directory (relative) @@ -337,4 +336,4 @@ from git: Be sure to set `wiki.rsync_dir` in order to correctly push your changes. When using `--rsync`, keep in mind that the rendered output must be configured -to work on the web server and set `wiki.root_url` accordingly. +to work on the web server. diff --git a/contrib/nitiwiki/examples/default/config.ini b/contrib/nitiwiki/examples/default/config.ini index 21e85ef..7917052 100644 --- a/contrib/nitiwiki/examples/default/config.ini +++ b/contrib/nitiwiki/examples/default/config.ini @@ -1,5 +1,4 @@ wiki.name=MyWiki wiki.desc=proudly powered by nit wiki.logo=assets/logo.png -wiki.root_url=http://localhost/ wiki.root_dir=/full/path/to/your/wiki/root/dir diff --git a/contrib/nitiwiki/examples/nitiwiki/config.ini b/contrib/nitiwiki/examples/nitiwiki/config.ini index 16eaffe..315462d 100644 --- a/contrib/nitiwiki/examples/nitiwiki/config.ini +++ b/contrib/nitiwiki/examples/nitiwiki/config.ini @@ -1,6 +1,5 @@ wiki.name=nitiwiki wiki.desc=proudly powered by nit wiki.logo=assets/logo.png -wiki.root_url=http://moz-code.org/nitiwiki/ wiki.root_dir=. wiki.rsync_dir=moz-code.org:nitiwiki/ diff --git a/contrib/nitiwiki/src/wiki_base.nit b/contrib/nitiwiki/src/wiki_base.nit index 9cd3eb0..21c4f32 100644 --- a/contrib/nitiwiki/src/wiki_base.nit +++ b/contrib/nitiwiki/src/wiki_base.nit @@ -79,7 +79,6 @@ class Nitiwiki print "nitiWiki" print "name: {config.wiki_name}" print "config: {config.ini_file}" - print "url: {config.root_url}" print "" if root_section.is_dirty then print "There is modified files:" @@ -640,12 +639,6 @@ class WikiConfig # * default: `` var wiki_logo: String is lazy do return value_or_default("wiki.logo", "") - # Root url of the wiki. - # - # * key: `wiki.root_url` - # * default: `http://localhost/` - var root_url: String is lazy do return value_or_default("wiki.root_url", "http://localhost/") - # Markdown extension recognized by this wiki. # # We allow only one kind of extension per wiki. diff --git a/contrib/nitiwiki/src/wiki_links.nit b/contrib/nitiwiki/src/wiki_links.nit index d261403..340ec74 100644 --- a/contrib/nitiwiki/src/wiki_links.nit +++ b/contrib/nitiwiki/src/wiki_links.nit @@ -90,10 +90,6 @@ end redef class WikiEntry - # Absolute url to `self` once generated. - # If you use this, the generated files will hard-code `root_url` - fun url: String do return wiki.config.root_url / href - # Relative path to `self` from the target root_url fun href: String do return breadcrumbs.join("/") -- 1.7.9.5