Use absolute URLs in a couple cases where relative ones were used

This commit is contained in:
BBaoVanC 2021-10-15 17:45:03 -05:00
parent e7f9240383
commit a02da46706
Signed by: bbaovanc
GPG Key ID: 18089E4E3CCF1D3A
2 changed files with 5 additions and 6 deletions

View File

@ -8,10 +8,10 @@
{{ end }} {{ end }}
{{ with .Site.Params.faviconICO }} {{ with .Site.Params.faviconICO }}
<link rel="icon" type="image/x-icon" href="{{.}}" /> <link rel="icon" type="image/x-icon" href="{{ . | absURL }}" />
{{ end }} {{ end }}
{{ with .Site.Params.faviconPNG }} {{ with .Site.Params.faviconPNG }}
<link rel="icon" type="image/png" href="{{.}}" /> <link rel="icon" type="image/png" href="{{ . | absURL }}" />
{{ end }} {{ end }}
{{ range .AlternativeOutputFormats -}} {{ range .AlternativeOutputFormats -}}

View File

@ -1,15 +1,14 @@
<h2 class="header"> <h2 class="header">
<a href="{{ "/" | relURL }}">{{ .Site.Title | markdownify }}</a> <a href="{{ "/" | absLangURL }}">{{ .Site.Title | markdownify }}</a>
</h2> </h2>
<nav class="navbar"> <nav class="navbar">
{{ with .Site.GetPage "/" }} {{ with .Site.GetPage "/" }}
{{/* if I use relLangURL, then it does /es/es/ instead of /es/ (for example) */}} <a class="navbar-item" href="{{ .Permalink | absLangURL }}">{{ .Title }}</a>
<a class="navbar-item" href="{{ .Permalink | relURL }}">{{ .Title }}</a>
{{ end }} {{ end }}
{{ range .Site.Menus.main }} {{ range .Site.Menus.main }}
<a class="navbar-item" href="{{ .URL }}">{{ .Name }}</a> <a class="navbar-item" href="{{ .URL | absLangURL }}">{{ .Name }}</a>
{{ end }} {{ end }}
</nav> </nav>