♻️ Change language `htmlCode` to `isoCode`

pull/100/head
James Panther 2022-01-27 15:42:05 +11:00
parent d86d1b82be
commit 53eeda3770
No known key found for this signature in database
GPG Key ID: D36F789E45745D17
5 changed files with 10 additions and 10 deletions

View File

@ -1,7 +1,7 @@
languageCode = "en"
languageName = "English"
displayName = "EN"
htmlCode = "en"
isoCode = "en"
weight = 1
rtl = false

View File

@ -1,21 +1,21 @@
languageCode = "en-au"
languageName = "English (Australia)"
displayName = ":flag-au:"
htmlCode = "en-AU"
isoCode = "en-AU"
weight = 1
rtl = false
title = "Congo"
# logo = "img/logo.jpg"
# description = "My awesome website"
# copyright = "Copy, _right?_ :thinking_face:"
description = "A powerful, lightweight theme for Hugo built with Tailwind CSS."
copyright = "© 2022 Congo contributors"
dateFormat = "2 January 2006"
[author]
name = "Congo"
image = "img/author.jpg"
# headline = ""
headline = "Not your ordinary theme!"
bio = "This is an example author bio, and although there's a stock photo of a dog here, this article was actually created by a human. :dog:"
links = [
{ twitter = "https://twitter.com/" },

View File

@ -72,10 +72,10 @@ The default file can be used as a template to create additional languages, or re
<!-- prettier-ignore-start -->
|Name|Default|Description|
|---|---|---|
|`languageCode`|`"en"`|The language code for this file. It can be a top-level language (ie. `en`) or a sub-variant (ie. `en-au`) and should match the language code in the filename. Hugo expects this value to always be in lowercase. For proper HTML compliance, set the `htmlCode` parameter which is case-sensitive.|
|`languageCode`|`"en"`|The Hugo language code for this file. It can be a top-level language (ie. `en`) or a sub-variant (ie. `en-au`) and should match the language code in the filename. Hugo expects this value to always be in lowercase. For proper HTML compliance, set the `isoCode` parameter which is case-sensitive.|
|`languageName`|`"English"`|The name of the language.|
|`displayName`|`"EN"`|The name used when the language appears on the website.|
|`htmlCode`|`"en"`|The language code for HTML metadata purposes. It can be a top-level language (ie. `en`) or a sub-variant (ie. `en-AU`).|
|`isoCode`|`"en"`|The ISO language code for HTML metadata purposes. It can be a top-level language (ie. `en`) or a sub-variant (ie. `en-AU`).|
|`weight`|`1`|The weight determines the order of languages when building multilingual sites.|
|`rtl`|`false`|Whether or not this is a RTL language. Set to `true` to reflow content from right-to-left. Congo fully supports using RTL and LTR languages at the same time and will dynamically adjust to both.|
|`dateFormat`|`"2 January 2006"`|How dates are formatted in this language. Refer to the [Hugo docs](https://gohugo.io/functions/format/#gos-layout-string) for acceptable formats.|

View File

@ -1,9 +1,9 @@
<!DOCTYPE html>
<html
lang="{{ with .Site.Language.Params.htmlCode | default (.Site.LanguageCode | default "en") }}
lang="{{ with .Site.Params.isoCode | default (.Site.LanguageCode | default "en") }}
{{- . -}}
{{ end }}"
dir="{{ if .Site.Language.Params.rtl | default false -}}
dir="{{ if .Site.Params.rtl | default false -}}
rtl
{{- else -}}
ltr

View File

@ -20,7 +20,7 @@
<div>
{{/* Copyright */}}
<p class="text-sm text-neutral-500 dark:text-neutral-400">
{{- with .Site.Copyright }}
{{- with .Site.Params.copyright }}
{{ . | emojify | markdownify }}
{{- else }}
&copy;