From 5a95f79b32d73060961b4dc77083cfd6c5a1e302 Mon Sep 17 00:00:00 2001 From: "Watal M. Iwasaki" Date: Tue, 4 Aug 2020 01:09:57 +0900 Subject: [PATCH] Ensure page_route starts with a leading slash (#1604) * Ensure page_route starts with a leading slash * Handle base_url = nil in page_route() * Refactor page_route() --- lib/gollum/templates/navbar.mustache | 2 +- lib/gollum/views/helpers.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/gollum/templates/navbar.mustache b/lib/gollum/templates/navbar.mustache index 2b7ba0fa..4b71a4bf 100644 --- a/lib/gollum/templates/navbar.mustache +++ b/lib/gollum/templates/navbar.mustache @@ -2,7 +2,7 @@
- Home + Home
diff --git a/lib/gollum/views/helpers.rb b/lib/gollum/views/helpers.rb index a1b2dc0d..f82f6062 100644 --- a/lib/gollum/views/helpers.rb +++ b/lib/gollum/views/helpers.rb @@ -54,7 +54,7 @@ module Precious end def page_route(page = nil) - clean_url(@base_url, page) + clean_url("/#{@base_url}", page) end def clean_url(*url)