Skip to content

Commit

Permalink
Merge pull request #608 from narrenfrei/update-taxonomy
Browse files Browse the repository at this point in the history
Fix incorrect use of isset - WIP
  • Loading branch information
LisaFC committed Jun 23, 2021
2 parents 0f9c38b + 9759ccd commit c36be07
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion layouts/_default/content.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ <h1>{{ .Title }}</h1>
{{ with .Params.description }}<div class="lead">{{ . | markdownify }}</div>{{ end }}
<header class="article-meta">
{{ $context := . }}
{{ if isset .Site.Params.Taxonomy "taxonomypageheader" }}
{{ if .Site.Params.Taxonomy.taxonomyPageHeader }}
{{ range $index, $taxo := .Site.Params.Taxonomy.taxonomyPageHeader }}
{{ partial "taxonomy_terms_article.html" (dict "context" $context "taxo" $taxo ) }}
{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/_default/taxonomy.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ <h3><a href="{{ $manualLink }}"{{ with .Params.manualLinkTitle }} title="{{ . }}
<p>{{ .Description | markdownify }}</p>
<header class="article-meta">
{{ $context := . }}
{{ if isset .Site.Params.Taxonomy "taxonomypageheader" }}
{{ if .Site.Params.Taxonomy.taxonomyPageHeader }}
{{ range $index, $taxo := .Site.Params.Taxonomy.taxonomyPageHeader }}
{{ partial "taxonomy_terms_article.html" (dict "context" $context "taxo" $taxo ) }}
{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/blog/content.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ <h1>{{ .Title }}</h1>
</div>
<header class="article-meta">
{{ $context := . }}
{{ if isset .Site.Params.Taxonomy "taxonomypageheader" }}
{{ if .Site.Params.Taxonomy.taxonomyPageHeader }}
{{ range $index, $taxo := .Site.Params.Taxonomy.taxonomyPageHeader }}
{{ partial "taxonomy_terms_article.html" (dict "context" $context "taxo" $taxo ) }}
{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/blog/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ <h5 class="mt-0 mb-1"><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h5>
<p class="mb-2 mb-md-3"><small class="text-muted">{{ .Date.Format ($.Param "time_format_blog") }} {{ T "ui_in"}} {{ .CurrentSection.LinkTitle }}</small></p>
<header class="article-meta">
{{ $context := . }}
{{ if isset .Site.Params.Taxonomy "taxonomypageheader" }}
{{ if .Site.Params.Taxonomy.taxonomyPageHeader }}
{{ range $index, $taxo := .Site.Params.Taxonomy.taxonomyPageHeader }}
{{ partial "taxonomy_terms_article.html" (dict "context" $context "taxo" $taxo ) }}
{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/docs/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ <h1>{{ .Title }}</h1>
{{ with .Params.description }}<div class="lead">{{ . | markdownify }}</div>{{ end }}
<header class="article-meta">
{{ $context := . }}
{{ if isset .Site.Params.Taxonomy "taxonomypageheader" }}
{{ if .Site.Params.Taxonomy.taxonomyPageHeader }}
{{ range $index, $taxo := .Site.Params.Taxonomy.taxonomyPageHeader }}
{{ partial "taxonomy_terms_article.html" (dict "context" $context "taxo" $taxo ) }}
{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/taxonomy_terms_clouds.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{ $context := . }}
{{ if isset .Site.Params.Taxonomy "taxonomycloud" }}
{{ if .Site.Params.Taxonomy.taxonomyCloud }}
{{ range $index, $taxo := .Site.Params.Taxonomy.taxonomyCloud }}
{{ if isset $.Site.Params.Taxonomy "taxonomycloudtitle" }}
{{ $.Scratch.Set "title" ( index $.Site.Params.Taxonomy.taxonomyCloudTitle $index ) }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/swagger/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ <h1>{{ .Title }}</h1>
{{ with .Params.description }}<div class="lead">{{ . | markdownify }}</div>{{ end }}
<header class="article-meta">
{{ $context := . }}
{{ if isset .Site.Params.Taxonomy "taxonomypageheader" }}
{{ if .Site.Params.Taxonomy.taxonomyPageHeader }}
{{ range $index, $taxo := .Site.Params.Taxonomy.taxonomyPageHeader }}
{{ partial "taxonomy_terms_article.html" (dict "context" $context "taxo" $taxo ) }}
{{ end }}
Expand Down
2 changes: 1 addition & 1 deletion userguide/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ enable = true
[params.print]
disable_toc = false

[params.taxonomy]
# [params.taxonomy]
# taxonomyCloud = ["tags", "categories"] # set taxonomyCloud = [] to hide taxonomy clouds
# taxonomyCloudTitle = ["Tag Cloud", "Cloud of Categories"] # if used, must have same lang as taxonomyCloud
# taxonomyPageHeader = ["tags", "categories"] # set taxonomyPageHeader = [] to hide taxonomies on the page headers
Expand Down

0 comments on commit c36be07

Please sign in to comment.