fix bug showing list section and title names even if one is the plural of the other
This commit is contained in:
parent
5826b560ac
commit
7f379cd454
|
@ -2,12 +2,11 @@
|
||||||
<h2>
|
<h2>
|
||||||
{{ $title := .Title }}
|
{{ $title := .Title }}
|
||||||
{{ $section := .Section | humanize }}
|
{{ $section := .Section | humanize }}
|
||||||
{{ if and (ne $section $title) (ne $section "Tags") }}
|
{{ if and (ne $section $title) (ne $section "Tags") (ne $title (printf "%ss" $section)) }}
|
||||||
{{ $section }}:
|
{{ $section }}:
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if and (eq $section "Tags") (ne $section $title) }}Tag: #{{ end }}{{ $title }}
|
{{ if and (eq $section "Tags") (ne $section $title) }}Tag: #{{ end }}{{ $title }}
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
{{ range .Pages }}
|
{{ range .Pages }}
|
||||||
<li><span class="date">{{ .Date.Format "2006-01-02" }}</span> <a href="{{ .Permalink }}">{{ .Title }}</a></li>
|
<li><span class="date">{{ .Date.Format "2006-01-02" }}</span> <a href="{{ .Permalink }}">{{ .Title }}</a></li>
|
||||||
|
|
Loading…
Reference in New Issue