Fix URLs for baseURLs that are on a subpath

This commit is contained in:
BBaoVanC 2021-10-23 00:25:06 -05:00
parent edff1f416d
commit 4e9ce6df46
Signed by: bbaovanc
GPG Key ID: 18089E4E3CCF1D3A
3 changed files with 6 additions and 6 deletions

View File

@ -17,8 +17,8 @@ enableGitInfo = true
description = "Example website for bobatheme"
# these are for favicons in bobatheme
faviconICO = "/favicon.ico"
faviconPNG = "/favicon.png"
faviconICO = "favicon.ico"
faviconPNG = "favicon.png"
# show word count and/or reading time (enabled by default)
wordcount = true

View File

@ -47,7 +47,7 @@
{{ with .GitInfo }}
<span class="post-meta-item">
{{ partial "icon.html" "git-commit" }}
<a href="{{ (printf "%s/commit/%s" $.Site.Params.repoURL .Hash) | absLangURL }}">
<a href="{{ (printf "%s/commit/%s" $.Site.Params.repoURL .Hash) | absURL }}">
<code>{{ .AbbreviatedHash }}</code>
</a>
</span>

View File

@ -1,14 +1,14 @@
<h2 class="header">
<a href="{{ "/" | absLangURL }}">{{ .Site.Title | markdownify }}</a>
<a href="{{ .Site.Home.Permalink | absLangURL }}">{{ .Site.Title | markdownify }}</a>
</h2>
<nav class="navbar">
{{ with .Site.GetPage "/" }}
{{ with .Site.Home }}
<a class="navbar-item" href="{{ .Permalink | absLangURL }}">{{ .Title }}</a>
{{ end }}
{{ range .Site.Menus.main }}
<a class="navbar-item" href="{{ .URL | absLangURL }}">{{ .Name }}</a>
<a class="navbar-item" href="{{ .URL }}">{{ .Name }}</a>
{{ end }}
</nav>