Fix links of posts, notes, and tags/%s directories redirection (#703)

This commit is contained in:
Hiroya Onoe 2022-11-13 00:07:19 +09:00 committed by GitHub
parent 2cfe671487
commit 996346b249
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -24,7 +24,7 @@
</form>
<div class="sidebar-tree">
<ul class="tree" id="tree">
<li id="list-heading"><a href="{{ "/posts" | relLangURL }}" data-filter="all">{{ i18n "posts" }}</a></li>
<li id="list-heading"><a href="{{ "/posts/" | relLangURL }}" data-filter="all">{{ i18n "posts" }}</a></li>
<div class="subtree">
{{ partial "navigators/sidebar.html" (dict "menuName" "sidebar" "menuItems" site.Menus.sidebar "ctx" .) }}
</div>
@ -58,7 +58,7 @@
<div class="taxonomy-terms">
<ul style="padding-left: 0;">
{{ range .Params.tags }}
{{ $url:= printf "tags/%s" . }}
{{ $url:= printf "tags/%s/" . }}
<li class="rounded"><a href="{{ $url | urlize | relLangURL }}" class="btn, btn-sm">{{ . }}</a></li>
{{ end }}
</ul>

View file

@ -106,12 +106,12 @@
{{ end }}
{{ if $blogEnabled }}
<li class="nav-item">
<a class="nav-link" id="blog-link" href="{{ "/posts" | relLangURL }}">{{ i18n "posts" }}</a>
<a class="nav-link" id="blog-link" href="{{ "/posts/" | relLangURL }}">{{ i18n "posts" }}</a>
</li>
{{ end }}
{{ if $notesEnabled }}
<li class="nav-item">
<a class="nav-link" id="note-link" href="{{ "/notes" | relLangURL }}">{{ i18n "notes" }}</a>
<a class="nav-link" id="note-link" href="{{ "/notes/" | relLangURL }}">{{ i18n "notes" }}</a>
</li>
{{ end }}
{{ range $customMenus }}