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

View File

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

View File

@ -1,6 +1,6 @@
<div class="social-icons"> <div class="social-icons">
{{- range . }} {{- 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" . }} {{ partial "svg.html" . }}
</a> </a>
{{- end }} {{- end }}

View File

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

View File

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