Check for unset categories, tags params
This commit is contained in:
@@ -10,16 +10,16 @@
|
|||||||
{{ range . }}
|
{{ range . }}
|
||||||
{{ $result = $result | append (.Title | markdownify | plainify | htmlUnescape) }}
|
{{ $result = $result | append (.Title | markdownify | plainify | htmlUnescape) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ else }}
|
{{ else with $page.Params.categories}}
|
||||||
{{ $result = $result | append $page.Params.categories }}
|
{{ $result = $result | append . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ with $page.GetTerms "tags" }}
|
{{ with $page.GetTerms "tags" }}
|
||||||
{{ range . }}
|
{{ range . }}
|
||||||
{{ $result = $result | append (.Title | markdownify | plainify | htmlUnescape) }}
|
{{ $result = $result | append (.Title | markdownify | plainify | htmlUnescape) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ else }}
|
{{ else with $page.Params.tags }}
|
||||||
{{ $result = $result | append $page.Params.tags }}
|
{{ $result = $result | append . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ $result = delimit ($result | uniq | sort) ", " }}
|
{{ $result = delimit ($result | uniq | sort) ", " }}
|
||||||
|
|||||||
Reference in New Issue
Block a user