Update to work with Caddy sub directories

This commit is contained in:
Henrique Dias
2016-07-01 15:46:06 +01:00
parent e0a3c6cb22
commit d5306b594f
4 changed files with 16 additions and 10 deletions

View File

@@ -60,10 +60,10 @@ func (i Info) BreadcrumbMap() map[string]string {
func (i Info) PreviousLink() string {
path := strings.TrimSuffix(i.Path, "/")
path = strings.TrimPrefix(path, "/")
path = i.Config.BaseURL + "/" + path
path = i.Config.AbsoluteURL + "/" + path
path = path[0 : len(path)-len(i.Name)]
if len(path) < len(i.Config.BaseURL+"/") {
if len(path) < len(i.Config.AbsoluteURL+"/") {
return ""
}