Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/themefisher/airspace-hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSalim B <salim@posteo.de>2021-08-04 15:50:08 +0300
committerSalim B <salim@posteo.de>2021-08-04 15:50:08 +0300
commit83846a293821883226a3a6c6ec49e18574c395bc (patch)
tree72e6fddf2d47f8179450015fa041cabb47508c76 /exampleSite
parenta973a8f644d6a38702b3810a0458a32bf900977d (diff)
Replace custom solution to localize timestamps with Hugo's official one
The latter was introduced in [Hugo 0.87.0](https://github.com/gohugoio/hugo/releases/tag/v0.87.0).
Diffstat (limited to 'exampleSite')
-rw-r--r--exampleSite/.forestry/settings.yml6
-rw-r--r--exampleSite/config.toml2
-rw-r--r--exampleSite/content/english/blog/date-i18n.md20
-rw-r--r--exampleSite/content/french/blog/date-i18n.md20
-rw-r--r--exampleSite/content/german/blog/date-i18n.md20
-rw-r--r--exampleSite/content/italian/blog/date-i18n.md20
6 files changed, 72 insertions, 16 deletions
diff --git a/exampleSite/.forestry/settings.yml b/exampleSite/.forestry/settings.yml
index e093583..2fb67d7 100644
--- a/exampleSite/.forestry/settings.yml
+++ b/exampleSite/.forestry/settings.yml
@@ -2,7 +2,7 @@
new_page_extension: md
auto_deploy: false
admin_path: ''
-webhook_url:
+webhook_url:
sections:
- type: heading
label: Homepage
@@ -111,11 +111,11 @@ file_template: ":filename:"
build:
preview_env:
- HUGO_ENV=staging
- - HUGO_VERSION=0.83.1
+ - HUGO_VERSION=0.87.0
preview_output_directory: public
preview_docker_image: forestryio/hugo:latest
mount_path: "/srv"
working_dir: "/srv"
instant_preview_command: hugo server -D -E -F --port 8080 --bind 0.0.0.0 --renderToDisk
-d public
-version: 0.83.1
+version: 0.87.0
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 7912dbe..45584aa 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -18,7 +18,7 @@ googleAnalytics = ""
############################# Modules ##############################
[module.hugoVersion]
extended = true
-min = "0.83.1"
+min = "0.87.0"
################################# Output formats ##############################
diff --git a/exampleSite/content/english/blog/date-i18n.md b/exampleSite/content/english/blog/date-i18n.md
index 3ccb06d..d096258 100644
--- a/exampleSite/content/english/blog/date-i18n.md
+++ b/exampleSite/content/english/blog/date-i18n.md
@@ -11,16 +11,30 @@ type: "post"
---
-To write out an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp in the current language, you can use the `date_i18n` shortcode:
+To write out an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp in the current language, you can use the `date_l10n` shortcode:
Writing
```
-{{%/* date_i18n "2020-10-20" */%}}
+{{%/* date_l10n "2020-10-20" */%}}
```
will result in
```
-{{% date_i18n "2020-10-20" %}}
+{{% date_l10n "2020-10-20" %}}
+```
+
+You can optionally specify a different [formatting layout](https://gohugo.io/functions/dateformat/#datetime-formatting-layouts):
+
+For example, the following
+
+```
+{{%/* date_l10n "2020-10-20" ":date_short" */%}}
+```
+
+will result in
+
+```
+{{% date_l10n "2020-10-20" ":date_short" %}}
```
diff --git a/exampleSite/content/french/blog/date-i18n.md b/exampleSite/content/french/blog/date-i18n.md
index bdb4323..37759c2 100644
--- a/exampleSite/content/french/blog/date-i18n.md
+++ b/exampleSite/content/french/blog/date-i18n.md
@@ -11,16 +11,30 @@ type: "post"
---
-Pour écrire un horodatage [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) dans la langue courante, vous pouvez utiliser le shortcode `date_i18n` :
+Pour écrire un horodatage [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) dans la langue courante, vous pouvez utiliser le shortcode `date_l10n` :
L'écriture de
```
-{{%/* date_i18n "2020-10-20" */%}}
+{{%/* date_l10n "2020-10-20" */%}}
```
donne
```
-{{% date_i18n "2020-10-20" %}}
+{{% date_l10n "2020-10-20" %}}
+```
+
+Vous pouvez facultativement spécifier une autre [mise en forme](https://gohugo.io/functions/dateformat/#datetime-formatting-layouts):
+
+Par exemple, le résultat suivant
+
+```
+{{%/* date_l10n "2020-10-20" ":date_short" */%}}
+```
+
+est
+
+```
+{{% date_l10n "2020-10-20" ":date_short" %}}
```
diff --git a/exampleSite/content/german/blog/date-i18n.md b/exampleSite/content/german/blog/date-i18n.md
index 0f36521..a5851d8 100644
--- a/exampleSite/content/german/blog/date-i18n.md
+++ b/exampleSite/content/german/blog/date-i18n.md
@@ -11,16 +11,30 @@ type: "post"
---
-Um einen [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601)-Zeitstempel in der aktuellen Sprache auszuschreiben, kann der Shortcode `date_i18n` verwendet werden:
+Um einen [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601)-Zeitstempel in der aktuellen Sprache auszuschreiben, kann der Shortcode `date_l10n` verwendet werden:
Wenn
```
-{{%/* date_i18n "2020-10-20" */%}}
+{{%/* date_l10n "2020-10-20" */%}}
```
geschrieben wird, resultiert
```
-{{% date_i18n "2020-10-20" %}}
+{{% date_l10n "2020-10-20" %}}
+```
+
+Optional kann ein anderes [Format-Layout](https://gohugo.io/functions/dateformat/#datetime-formatting-layouts) spezifiert werden:
+
+Beispielsweise resultiert folgendes
+
+```
+{{%/* date_l10n "2020-10-20" ":date_short" */%}}
+```
+
+in
+
+```
+{{% date_l10n "2020-10-20" ":date_short" %}}
```
diff --git a/exampleSite/content/italian/blog/date-i18n.md b/exampleSite/content/italian/blog/date-i18n.md
index 2ba4055..5a8d66d 100644
--- a/exampleSite/content/italian/blog/date-i18n.md
+++ b/exampleSite/content/italian/blog/date-i18n.md
@@ -11,16 +11,30 @@ type: "post"
---
-Per scrivere un timestamp [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) nella lingua corrente, puoi usare lo shortcode `date_i18n` :
+Per scrivere un timestamp [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) nella lingua corrente, puoi usare lo shortcode `date_l10n` :
Scrivendo
```
-{{%/* date_i18n "2020-10-20" */%}}
+{{%/* date_l10n "2020-10-20" */%}}
```
si ottiene
```
-{{% date_i18n "2020-10-20" %}}
+{{% date_l10n "2020-10-20" %}}
+```
+
+Puoi opzionalmente specificare un diverso [layout di formattazione](https://gohugo.io/functions/dateformat/#datetime-formatting-layouts):
+
+Per esempio, il seguente
+
+```
+{{%/* date_l10n "2020-10-20" ":date_short" */%}}
+```
+
+risultato sarà
+
+```
+{{% date_l10n "2020-10-20" ":date_short" %}}
```