Fix links to static content
Use absURL to find the URL for static content such as images, CSS and JavaScript. The previous approach sometimes led to an extra slash between the domain name and the path, breaking the links. (In particular, it works when tested with hugo server, but breaks in production.)
This commit is contained in:
parent
9c165c43d8
commit
efe742f442
3 changed files with 6 additions and 6 deletions
|
|
@ -66,7 +66,7 @@
|
|||
<div class="avatar-img-border">
|
||||
{{ if isset .Site.Params "logo" }}
|
||||
<a title="{{ .Site.Title }}" href="{{ "/" | absLangURL }}">
|
||||
<img class="avatar-img" src="{{ .Site.BaseURL }}/{{ .Site.Params.logo }}" alt="{{ .Site.Title }}" />
|
||||
<img class="avatar-img" src="{{ .Site.Params.logo | absURL }}" alt="{{ .Site.Title }}" />
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue