Make opening tag link in a new tab optional

Signed-off-by: Marek Pikuła <[email protected]>
This commit is contained in:
Marek Pikuła
2024-06-02 19:53:40 +02:00
parent 4687d53336
commit 50ce9a0ac5
2 changed files with 9 additions and 5 deletions
+2
View File
@@ -385,6 +385,8 @@ params:
content: "min read" content: "min read"
scrollprogress: scrollprogress:
enable: true enable: true
tags:
openInNewTab: true
# For translations # For translations
terms: terms:
+3 -1
View File
@@ -58,7 +58,9 @@
<h5>{{ .Site.Params.terms.tags | default "Tags" }}</h5> <h5>{{ .Site.Params.terms.tags | default "Tags" }}</h5>
<ul class="tags-ul list-unstyled list-inline"> <ul class="tags-ul list-unstyled list-inline">
{{range .Params.tags}} {{range .Params.tags}}
<li class="list-inline-item"><a href="{{`tags` | absURL}}/{{.| urlize}}" target="_blank">{{.}}</a></li> <li class="list-inline-item"><a href="{{`tags` | absURL}}/{{.| urlize}}"
{{ if site.Params.singlePages.tags.openInNewTab | default true }}target="_blank"{{ end }}
>{{.}}</a></li>
{{end}} {{end}}
</ul> </ul>
</aside> </aside>