nitiwiki: remove completely root_url as everything is now relative
authorJean Privat <jean@pryen.org>
Thu, 9 Jul 2015 15:44:41 +0000 (11:44 -0400)
committerJean Privat <jean@pryen.org>
Thu, 9 Jul 2015 17:50:08 +0000 (13:50 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

contrib/nitiwiki/README.md
contrib/nitiwiki/examples/default/config.ini
contrib/nitiwiki/examples/nitiwiki/config.ini
contrib/nitiwiki/src/wiki_base.nit
contrib/nitiwiki/src/wiki_links.nit

index 1c764d4..77e0b56 100644 (file)
@@ -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.
index 21e85ef..7917052 100644 (file)
@@ -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
index 16eaffe..315462d 100644 (file)
@@ -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/
index 9cd3eb0..21c4f32 100644 (file)
@@ -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.
index d261403..340ec74 100644 (file)
@@ -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("/")