mirror of https://github.com/jpanther/congo.git
♻️ Change language `htmlCode` to `isoCode`
parent
d86d1b82be
commit
53eeda3770
|
@ -1,7 +1,7 @@
|
||||||
languageCode = "en"
|
languageCode = "en"
|
||||||
languageName = "English"
|
languageName = "English"
|
||||||
displayName = "EN"
|
displayName = "EN"
|
||||||
htmlCode = "en"
|
isoCode = "en"
|
||||||
weight = 1
|
weight = 1
|
||||||
rtl = false
|
rtl = false
|
||||||
|
|
||||||
|
|
|
@ -1,21 +1,21 @@
|
||||||
languageCode = "en-au"
|
languageCode = "en-au"
|
||||||
languageName = "English (Australia)"
|
languageName = "English (Australia)"
|
||||||
displayName = ":flag-au:"
|
displayName = ":flag-au:"
|
||||||
htmlCode = "en-AU"
|
isoCode = "en-AU"
|
||||||
weight = 1
|
weight = 1
|
||||||
rtl = false
|
rtl = false
|
||||||
|
|
||||||
title = "Congo"
|
title = "Congo"
|
||||||
# logo = "img/logo.jpg"
|
# logo = "img/logo.jpg"
|
||||||
# description = "My awesome website"
|
description = "A powerful, lightweight theme for Hugo built with Tailwind CSS."
|
||||||
# copyright = "Copy, _right?_ :thinking_face:"
|
copyright = "© 2022 Congo contributors"
|
||||||
|
|
||||||
dateFormat = "2 January 2006"
|
dateFormat = "2 January 2006"
|
||||||
|
|
||||||
[author]
|
[author]
|
||||||
name = "Congo"
|
name = "Congo"
|
||||||
image = "img/author.jpg"
|
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:"
|
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 = [
|
links = [
|
||||||
{ twitter = "https://twitter.com/" },
|
{ twitter = "https://twitter.com/" },
|
||||||
|
|
|
@ -72,10 +72,10 @@ The default file can be used as a template to create additional languages, or re
|
||||||
<!-- prettier-ignore-start -->
|
<!-- prettier-ignore-start -->
|
||||||
|Name|Default|Description|
|
|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.|
|
|`languageName`|`"English"`|The name of the language.|
|
||||||
|`displayName`|`"EN"`|The name used when the language appears on the website.|
|
|`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.|
|
|`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.|
|
|`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.|
|
|`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.|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html
|
<html
|
||||||
lang="{{ with .Site.Language.Params.htmlCode | default (.Site.LanguageCode | default "en") }}
|
lang="{{ with .Site.Params.isoCode | default (.Site.LanguageCode | default "en") }}
|
||||||
{{- . -}}
|
{{- . -}}
|
||||||
{{ end }}"
|
{{ end }}"
|
||||||
dir="{{ if .Site.Language.Params.rtl | default false -}}
|
dir="{{ if .Site.Params.rtl | default false -}}
|
||||||
rtl
|
rtl
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
ltr
|
ltr
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
<div>
|
<div>
|
||||||
{{/* Copyright */}}
|
{{/* Copyright */}}
|
||||||
<p class="text-sm text-neutral-500 dark:text-neutral-400">
|
<p class="text-sm text-neutral-500 dark:text-neutral-400">
|
||||||
{{- with .Site.Copyright }}
|
{{- with .Site.Params.copyright }}
|
||||||
{{ . | emojify | markdownify }}
|
{{ . | emojify | markdownify }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
©
|
©
|
||||||
|
|
Loading…
Reference in New Issue