diff options
author | Frédéric Guillot <fred@miniflux.net> | 2018-02-03 15:33:17 -0800 |
---|---|---|
committer | Frédéric Guillot <fred@miniflux.net> | 2018-02-03 15:33:17 -0800 |
commit | 9c4299720900fce52daedfce2314d31e92f7fe1d (patch) | |
tree | 2a67a75d71011d071910a4cb4216d45ee9d904c4 /template | |
parent | 78385a351e208feb183549c2fa854b302da0c690 (diff) |
Add support for base URLs with subfolders
Diffstat (limited to 'template')
-rw-r--r-- | template/html/integrations.html | 4 | ||||
-rw-r--r-- | template/template.go | 3 | ||||
-rw-r--r-- | template/views.go | 8 |
3 files changed, 9 insertions, 6 deletions
diff --git a/template/html/integrations.html b/template/html/integrations.html index 8c597ee..91f5b7a 100644 --- a/template/html/integrations.html +++ b/template/html/integrations.html @@ -40,7 +40,7 @@ <label for="form-fever-password">{{ t "Fever Password" }}</label> <input type="password" name="fever_password" id="form-fever-password" value="{{ .form.FeverPassword }}"> - <p>{{ t "Fever API endpoint:" }} <strong>{{ baseURL }}{{ route "feverEndpoint" }}</strong></p> + <p>{{ t "Fever API endpoint:" }} <strong>{{ rootURL }}{{ route "feverEndpoint" }}</strong></p> </div> <h3>Pinboard</h3> @@ -120,7 +120,7 @@ <p>{{ t "This special link allows you to subscribe to a website directly by using a bookmark in your web browser." }}</p> <div class="bookmarklet"> - <a href="javascript:location.href='{{ baseURL }}{{ route "bookmarklet" }}?uri='+encodeURIComponent(window.location.href)">{{ t "Add to Miniflux" }}</a> + <a href="javascript:location.href='{{ rootURL }}{{ route "bookmarklet" }}?uri='+encodeURIComponent(window.location.href)">{{ t "Add to Miniflux" }}</a> </div> <p>{{ t "Drag and drop this link to your bookmarks." }}</p> diff --git a/template/template.go b/template/template.go index e392dad..b3374ff 100644 --- a/template/template.go +++ b/template/template.go @@ -38,6 +38,9 @@ func (e *Engine) parseAll() { "baseURL": func() string { return e.cfg.BaseURL() }, + "rootURL": func() string { + return e.cfg.RootURL() + }, "hasOAuth2Provider": func(provider string) bool { return e.cfg.OAuth2Provider() == provider }, diff --git a/template/views.go b/template/views.go index acf96d8..e189e5d 100644 --- a/template/views.go +++ b/template/views.go @@ -1,5 +1,5 @@ // Code generated by go generate; DO NOT EDIT. -// 2018-01-31 22:01:40.010173412 -0800 PST m=+0.035694895 +// 2018-02-03 15:28:45.540437885 -0800 PST m=+0.032377624 package template @@ -815,7 +815,7 @@ var templateViewsMap = map[string]string{ <label for="form-fever-password">{{ t "Fever Password" }}</label> <input type="password" name="fever_password" id="form-fever-password" value="{{ .form.FeverPassword }}"> - <p>{{ t "Fever API endpoint:" }} <strong>{{ baseURL }}{{ route "feverEndpoint" }}</strong></p> + <p>{{ t "Fever API endpoint:" }} <strong>{{ rootURL }}{{ route "feverEndpoint" }}</strong></p> </div> <h3>Pinboard</h3> @@ -895,7 +895,7 @@ var templateViewsMap = map[string]string{ <p>{{ t "This special link allows you to subscribe to a website directly by using a bookmark in your web browser." }}</p> <div class="bookmarklet"> - <a href="javascript:location.href='{{ baseURL }}{{ route "bookmarklet" }}?uri='+encodeURIComponent(window.location.href)">{{ t "Add to Miniflux" }}</a> + <a href="javascript:location.href='{{ rootURL }}{{ route "bookmarklet" }}?uri='+encodeURIComponent(window.location.href)">{{ t "Add to Miniflux" }}</a> </div> <p>{{ t "Drag and drop this link to your bookmarks." }}</p> @@ -1225,7 +1225,7 @@ var templateViewsMapChecksums = map[string]string{ "feeds": "65b0a47c4438810b9d51c60f3f3b2519690e56ff74029e6296c68626b83a470b", "history": "d2476fd727e4f53428b5ed1f3f9423063583337ec8cfe1dd9c931fcb03852a20", "import": "73b5112e20bfd232bf73334544186ea419505936bc237d481517a8622901878f", - "integrations": "a677434e9a8be1f80cfbc1d04828dacc7abcec2a22b45c80594d49cc2ba7c0e5", + "integrations": "958b73d632a3e2a79368bb1582efb8aabc438cef4fa6e8dc1aa4932494916aca", "login": "7d83c3067c02f1f6aafdd8816c7f97a4eb5a5a4bdaaaa4cc1e2fbb9c17ea65e8", "sessions": "d8ef5900d8ea8395804b320002e5f45ed0ab8b790e43f674f61f8b9787041cbd", "settings": "ea2505b9d0a6d6bb594dba87a92079de19baa6d494f0651693a7685489fb7de9", |