fix settings link

This commit is contained in:
Henrique Dias 2016-07-01 16:10:47 +01:00
parent 6b87fc2485
commit 489db64055
3 changed files with 5 additions and 4 deletions

View File

@ -1,7 +1,8 @@
'use strict';
document.addEventListener('DOMContentLoaded', event => {
document.getElementById('logout').insertAdjacentHTML('beforebegin', `<a href="/admin/settings/">
let link = document.querySelector('header > div:first-child a:first-child').getAttribute('href') + "/settings/"
document.getElementById('logout').insertAdjacentHTML('beforebegin', `<a href="${link}">
<div class="action">
<i class="material-icons">settings</i>
</div>

File diff suppressed because one or more lines are too long

View File

@ -69,7 +69,7 @@ func (h Hugo) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error) {
frontmatter = "toml"
}
http.Redirect(w, r, h.Config.BaseURL+"/config."+frontmatter, http.StatusTemporaryRedirect)
http.Redirect(w, r, h.FileManager.Configs[0].AbsoluteURL+"/config."+frontmatter, http.StatusTemporaryRedirect)
return 0, nil
}