Skip to content

Commit f064787

Browse files
committed
fix: added absURL to reference base path
1 parent 2fe6639 commit f064787

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

layouts/partials/header.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div role="navigation" aria-label="Main">
22
<div class="nav-left">
3-
<a href="{{- (index .Ancestors.Reverse 0 ).RelPermalink -}}" style="color: inherit;">{{- site.Title -}}</a>
3+
<a href="{{- absURL "/" -}}" style="color: inherit;">{{- site.Title -}}</a>
44
</div>
55
<div class="nav-right">
66
<div id="nav-dropdown-menu" class="hidden" href="#">

layouts/partials/search_bar.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<script>
99
function searchBarSubmit(event) {
1010
event.preventDefault();
11-
const relativeUrl = `/{{- site.Params.rtwt.searchPath -}}/?q=${encodeURIComponent(event.target.elements['searchInput'].value)}`;
11+
const relativeUrl = `{{- absURL site.Params.rtwt.searchPath -}}/?q=${encodeURIComponent(event.target.elements['searchInput'].value)}`;
1212
window.location.href = relativeUrl;
1313
}
1414
</script>

layouts/partials/side/single.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{- $baseURL := .Site.BaseURL -}}
12
{{- if site.Params.rtwt.side.single.showDetails -}}
23
<div class="side-details">
34
<span>{{- .WordCount }} {{ i18n "details_words" -}}</span>
@@ -8,7 +9,7 @@
89
<small>
910
{{- $k -}}:
1011
{{ range (index page.Params $k) -}}
11-
<span class="details-taxonomy"><a href="/{{- $k | urlize -}}/{{- . | urlize -}}">{{- . -}}</a></span>
12+
<span class="details-taxonomy"><a href="{{- absURL (printf "%s/%s" ($k | urlize) (. | urlize)) -}}">{{- . -}}</a></span>
1213
{{- end -}}
1314
</small>
1415
</div>

0 commit comments

Comments
 (0)