From 7c180c86a423f7fe4d9eb7d17b8f516532df0a25 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Garcia Ballester Date: Tue, 24 Jul 2012 23:46:22 +0200 Subject: [PATCH 1/2] =?UTF-8?q?Set=20wiki=20=E2=80=9Cbase=5Fpath=E2=80=9D?= =?UTF-8?q?=20option=20to=20fix=20=E2=80=9Cbase=5Furl=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If the “base_path” option of the wiki is not set, set it to the base url. It will make links work seamlessly when mounting to a relative url. --- lib/gollum/frontend/app.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/gollum/frontend/app.rb b/lib/gollum/frontend/app.rb index cdb41b9e..6f6e683f 100644 --- a/lib/gollum/frontend/app.rb +++ b/lib/gollum/frontend/app.rb @@ -69,6 +69,7 @@ module Precious before do @base_url = url('/') + settings.wiki_options.merge!({ :base_path => @base_url }) unless settings.wiki_options.has_key? :base_path end get '/' do From 88ed662fd4dcae63142d50cbf5decb36e9d2eab0 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Garcia Ballester Date: Tue, 24 Jul 2012 23:51:49 +0200 Subject: [PATCH 2/2] =?UTF-8?q?Fix=20editor=20to=20work=20with=20=E2=80=9C?= =?UTF-8?q?base=5Furl=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../frontend/public/gollum/javascript/editor/gollum.editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gollum/frontend/public/gollum/javascript/editor/gollum.editor.js b/lib/gollum/frontend/public/gollum/javascript/editor/gollum.editor.js index 8dee8aef..2cd547bf 100755 --- a/lib/gollum/frontend/public/gollum/javascript/editor/gollum.editor.js +++ b/lib/gollum/frontend/public/gollum/javascript/editor/gollum.editor.js @@ -269,7 +269,7 @@ } // attempt to load the definition for this language - var script_uri = '/javascript/editor/langs/' + markup_name + '.js'; + var script_uri = baseUrl + '/javascript/editor/langs/' + markup_name + '.js'; $.ajax({ url: script_uri, dataType: 'script',