#140, Use new GetTerms function to fix tag titles

This commit is contained in:
Alex Shpak 2020-03-19 22:00:45 +01:00
parent 0d1ba29999
commit a3059fe4f7
10 changed files with 8 additions and 14 deletions

View File

@ -25,7 +25,7 @@ jobs:
- name: Install Hugo
run: |
wget "https://github.com/gohugoio/hugo/releases/download/v0.62.0/hugo_extended_0.62.0_Linux-64bit.deb" -O /tmp/hugo.deb
wget "https://github.com/gohugoio/hugo/releases/download/v0.65.0/hugo_extended_0.65.0_Linux-64bit.deb" -O /tmp/hugo.deb
sudo dpkg -i /tmp/hugo.deb
- name: Run Hugo

View File

@ -1,6 +1,6 @@
# Hugo Book Theme
[![Hugo](https://img.shields.io/badge/hugo-0.62-blue.svg)](https://gohugo.io)
[![Hugo](https://img.shields.io/badge/hugo-0.65-blue.svg)](https://gohugo.io)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
### [Hugo](https://gohugo.io) documentation theme as simple as plain book
@ -31,7 +31,7 @@
## Requirements
- Hugo 0.60 or higher
- Hugo 0.65 or higher
- Hugo extended version, read more [here](https://gohugo.io/news/0.48-relnotes/)
## Installation

View File

@ -1 +0,0 @@
{"Target":"book.min.651109bd6f1663cae20024e8b68d60fd4127eade8c26dfdc236a797a99163647.css","MediaType":"text/css","Data":{"Integrity":"sha256-ZREJvW8WY8riACToto1g/UEn6t6MJt/cI2p5epkWNkc="}}

View File

@ -1 +0,0 @@
{"Target":"book.min.2f0632dc31655f852f191d7c354e584af6f6ca239af70afdd117bbe5950815b2.css","MediaType":"text/css","Data":{"Integrity":"sha256-LwYy3DFlX4UvGR18NU5YSvb2yiOa9wr90Re75ZUIFbI="}}

View File

@ -3,13 +3,11 @@
<h5>{{ .Format $dateFormat }}</h5>
{{ end }}
{{ range $term, $_ := .Site.Taxonomies }}
{{ with $list := $.Param $term }}
{{ range $taxonomy, $_ := .Site.Taxonomies }}
{{ with $terms := $.GetTerms $taxonomy }}
<div>
{{ range $n, $single := $list }}{{ if $n }}, {{ end }}
{{- with $.Site.GetPage (printf "/%s/%s" $term $single | urlize) }}
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
{{- end }}
{{ range $n, $term := $terms }}{{ if $n }}, {{ end }}
<a href="{{ $term.RelPermalink }}">{{ $term.Title }}</a>
{{- end }}
</div>
{{ end }}

View File

@ -8,7 +8,7 @@ description = "Hugo documentation theme as simple as plain book"
homepage = "https://github.com/alex-shpak/hugo-book"
tags = ["responsive", "clean", "documentation", "docs", "flexbox", "search", "mobile", "multilingual", "disqus"]
features = []
min_version = "0.62"
min_version = "0.65"
[author]
name = "Alex Shpak"