refactor: remove humanize function from taxonomy name

This commit is contained in:
Jimmy Cai 2020-10-10 09:13:40 +02:00
parent fc0e7c847c
commit 9df7271547
No known key found for this signature in database
GPG Key ID: 3EA408E527F37B18
3 changed files with 10 additions and 5 deletions

View File

@ -7,10 +7,15 @@
{{ if and $image.exists $image.resource }}
{{- $imageRaw := $image.resource | resources.Fingerprint "md5" -}}
{{- $20x := $imageRaw.Fill "20x20 smart" -}}
<a href="{{ .Permalink }}" class="color-tag"
data-image="{{ $20x.RelPermalink }}" data-key="{{ $context.Slug }}" data-hash="{{ $imageRaw.Data.Integrity }}">{{ .LinkTitle | humanize }}</a>
<a href="{{ .Permalink }}"
class="color-tag"
data-image="{{ $20x.RelPermalink }}"
data-key="{{ $context.Slug }}"
data-hash="{{ $imageRaw.Data.Integrity }}">
{{ .LinkTitle }}
</a>
{{ else }}
<a href="{{ .Permalink }}">{{ .LinkTitle | humanize }}</a>
<a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
{{ end }}
{{ end }}
</header>

View File

@ -1,7 +1,7 @@
{{ if .Params.Tags }}
<section class="article-tags">
{{ range (.GetTerms "tags") }}
<a href="{{ .Permalink }}">{{ .LinkTitle | humanize }}</a>
<a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
{{ end }}
</section>
{{ end }}

View File

@ -7,7 +7,7 @@
<div class="tagCloud-tags">
{{ range first .Site.Params.widgets.tagCloud.limit .Site.Taxonomies.tags.ByCount }}
<a href="{{ .Page.Permalink }}" class="font_size_{{ .Count }}">
{{ .Page.Title | humanize }}
{{ .Page.Title }}
</a>
{{ end }}
</div>