Skip to content

Commit

Permalink
Fixes Upstream Issue 349 - tag link has double forward slash (#354)
Browse files Browse the repository at this point in the history
* Fixes Upstream Issue 349 - tag link has double forward slash

* Updated fix for Upstream Issue 349 - tag link has double forward slash
  • Loading branch information
jvincentnz authored Jun 8, 2024
1 parent 5bb2aa1 commit 2610147
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
4 changes: 4 additions & 0 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
{{ if .Params.tags }}
<div class="blog-tags">
{{ range .Params.tags }}
<!-- Fix for "https://github.com/halogenica/beautifulhugo/issues/349".
Inspired by "https://github.com/dovidio/personalwebsite/commit/34762e94c29fd2c26c16c45f8ae2de21bdf9b46d".
<a href="{{ $.Site.LanguagePrefix | absURL }}/tags/{{ . | urlize }}/">{{ . }}</a>&nbsp;
-->
<a href="{{"tags" | absLangURL}}/{{ . | urlize }}/">{{ . }}</a>&nbsp;
{{ end }}
</div>
{{ end }}
Expand Down
5 changes: 5 additions & 0 deletions layouts/_default/terms.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ <h4 class="panel-title">
</a>
<div id="collapse{{ $value.Name | anchorize }}" class="panel-collapse collapse">
<div class="panel-body">
<!-- Fix for "https://github.com/halogenica/beautifulhugo/issues/349".
Inspired by "https://github.com/halogenica/beautifulhugo/pull/354#issuecomment-2106454808".
<a href="{{ $.Site.LanguagePrefix | absURL }}/{{ $data.Plural }}/{{ $value.Name | urlize }}/" class="list-group-item view-all">
-->
<a href="{{ $data.Plural | absLangURL }}/{{ $value.Name | urlize }}/" class="list-group-item view-all">
View all</a>
<div class="list-group">
{{ range $item := $value.WeightedPages }}
Expand Down
8 changes: 6 additions & 2 deletions layouts/partials/post_preview.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,12 @@ <h3 class="post-subtitle">
{{ if .Params.tags }}
<div class="blog-tags">
{{ range .Params.tags }}
<a href="{{ $.Site.LanguagePrefix | absURL }}/tags/{{ . | urlize }}/">{{ . }}</a>&nbsp;
{{ end }}
<!-- Fix for "https://github.com/halogenica/beautifulhugo/issues/349".
From "https://github.com/dovidio/personalwebsite/commit/34762e94c29fd2c26c16c45f8ae2de21bdf9b46d".
<a href="{{ $.Site.LanguagePrefix | absURL }}/tags/{{ . | urlize }}/">{{ . }}</a>&nbsp;
-->
<a href="{{"tags" | absLangURL}}/{{ . | urlize }}/">{{ . }}</a>&nbsp;
{{ end }}
</div>
{{ end }}

Expand Down

0 comments on commit 2610147

Please sign in to comment.