Use title instead of humanize

- https://gohugo.io/functions/title/
This commit is contained in:
Aditya Telange 2021-05-01 22:13:54 +05:30
parent 167ca42ce3
commit 0e3f44ff17
No known key found for this signature in database
GPG Key ID: 82E844EF3DA99E77
5 changed files with 9 additions and 9 deletions

View File

@ -123,12 +123,12 @@
{{- range . -}}
{{- if ne $lang .Lang }}
<li>
<a href="{{- .Permalink -}}" title="{{ .Language.Params.languageAltTitle | default (.Language.LanguageName | emojify) | default (.Lang | humanize) }}"
aria-label="{{ .Language.LanguageName | default (.Lang | humanize) }}">
<a href="{{- .Permalink -}}" title="{{ .Language.Params.languageAltTitle | default (.Language.LanguageName | emojify) | default (.Lang | title) }}"
aria-label="{{ .Language.LanguageName | default (.Lang | title) }}">
{{- if (and $.Site.Params.displayFullLangName (.Language.LanguageName)) }}
{{- .Language.LanguageName | emojify -}}
{{- else }}
{{- .Lang | humanize -}}
{{- .Lang | title -}}
{{- end -}}
</a>
</li>

View File

@ -12,8 +12,8 @@
{{- with .buttons }}
<div class="buttons">
{{- range . }}
<a class="button" href="{{ trim .url " " }}" rel="noopener" title="{{ .name | humanize }}">
<span class="button-inner">{{ .name }}</span>
<a class="button" href="{{ trim .url " " }}" rel="noopener" title="{{ .name | title }}">
<span class="button-inner">{{ .name | title }}</span>
</a>
{{- end }}
</div>

View File

@ -1,6 +1,6 @@
<div class="social-icons">
{{- range . }}
<a href="{{ trim .url " " }}" target="_blank" rel="noopener noreferrer me" title="{{ .name | humanize }}">
<a href="{{ trim .url " " }}" target="_blank" rel="noopener noreferrer me" title="{{ .name | title }}">
{{ partial "svg.html" . }}
</a>
{{- end }}

View File

@ -2,7 +2,7 @@
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "{{- ( .Site.Params.schema.publisherType | default "Organization") | humanize -}}",
"@type": "{{- ( .Site.Params.schema.publisherType | default "Organization") | title -}}",
"name": {{ .Site.Title }},
"url": {{ .Site.BaseURL }},
"description": {{ .Site.Params.description | plainify | truncate 180 | safeHTML }},
@ -105,7 +105,7 @@
"@id": {{ .Permalink | safeHTML }}
},
"publisher": {
"@type": "{{- ( .Site.Params.schema.publisherType | default "Organization") | humanize -}}",
"@type": "{{- ( .Site.Params.schema.publisherType | default "Organization") | title -}}",
"name": {{ .Site.Title }},
"logo": {
"@type": "ImageObject",

View File

@ -10,7 +10,7 @@
{{- if (and $.Site.Params.displayFullLangName (.Language.LanguageName)) }}
{{- .Language.LanguageName | emojify -}}
{{- else }}
{{- .Lang | humanize -}}
{{- .Lang | title -}}
{{- end -}}
</a>
</li>