Skip to content

Commit

Permalink
fix: use baseUrl for homepage links
Browse files Browse the repository at this point in the history
  • Loading branch information
jgazeau committed Jul 19, 2023
1 parent 94723a1 commit d378913
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion layouts/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
{{- "images/404.gif" | relURL -}}
{{- end -}}"
/>
<a id="footer404" href="{{- "/" | relLangURL -}}">
<a id="footer404" href="{{- .Site.BaseURL | relLangURL -}}">
{{- i18n "404_footer" -}}
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/theme/helpers/hrefResolver.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{{- with $href -}}
{{- with and (eq (slicestr $href 0 1) "/") (not $.this.Page.Site.Params.enforceRefrelLinks) -}}
{{- with eq $href "/" -}}
{{- $href = "/" | relLangURL -}}
{{- $href = $.Site.BaseURL | relLangURL -}}
{{- else -}}
{{- $href = (slicestr $href 1) | relURL -}}
{{- end -}}
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/theme/logo.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<a
id="globalLogo"
class="navbar-item navbar-item-standard is-paddingless"
href="{{- "/" | relLangURL -}}"
href="{{- .Site.BaseURL | relLangURL -}}"
>
<img
alt="{{- i18n "homepage_title" -}}"
Expand All @@ -16,7 +16,7 @@
<a
id="globalTouchLogo"
class="navbar-item navbar-item-standard is-paddingless"
href="{{- "/" | relLangURL -}}"
href="{{- .Site.BaseURL | relLangURL -}}"
>
<img
alt="{{- i18n "homepage_title" -}}"
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/theme/taxonomy-selector.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<div class="dropdown-content is-paddingless">
{{- range $taxonomyname, $taxonomy := .Site.Taxonomies -}}
{{- if gt (len $taxonomy) 0 -}}
{{- $.Scratch.Set "taxonomyUrl" (printf "%s%s%s" ("/" | relLangURL) ($taxonomyname | urlize) "/") -}}
{{- $.Scratch.Set "taxonomyUrl" (printf "%s%s%s" (.Site.BaseURL | relLangURL) ($taxonomyname | urlize) "/") -}}
{{- if eq $.Page.RelPermalink ($.Scratch.Get "taxonomyUrl") -}}
<div class="dropdown-item is-selected has-text-weight-bold">
{{- with $.Site.Params.taxonomies -}}
Expand Down

0 comments on commit d378913

Please sign in to comment.