mirror of https://github.com/theNewDynamic/gohugo-theme-ananke.git

Adam Chlan
11.42.2021 23c7cc68470c8daf5b412c6e573ccf769ccd6224
Basic example of multilingual (#386)

* Basic example of multilingual

* Add one post and the homepage

Co-authored-by: Regis Philibert <login@regisphilibert.com>
4 files added
10 files renamed
1 files modified
50 ■■■■■ changed files
exampleSite/config.toml 10 ●●●●● patch | view | raw | blame | history
exampleSite/content/en/_index.md patch | view | raw | blame | history
exampleSite/content/en/about/_index.md patch | view | raw | blame | history
exampleSite/content/en/contact.md patch | view | raw | blame | history
exampleSite/content/en/post/_index.md patch | view | raw | blame | history
exampleSite/content/en/post/chapter-1.md patch | view | raw | blame | history
exampleSite/content/en/post/chapter-2.md patch | view | raw | blame | history
exampleSite/content/en/post/chapter-3.md patch | view | raw | blame | history
exampleSite/content/en/post/chapter-4.md patch | view | raw | blame | history
exampleSite/content/en/post/chapter-5.md patch | view | raw | blame | history
exampleSite/content/en/post/chapter-6.md patch | view | raw | blame | history
exampleSite/content/fr/_index.md 8 ●●●●● patch | view | raw | blame | history
exampleSite/content/fr/contact.md 14 ●●●●● patch | view | raw | blame | history
exampleSite/content/fr/post/_index.md 5 ●●●●● patch | view | raw | blame | history
exampleSite/content/fr/post/chapter-1.md 13 ●●●●● patch | view | raw | blame | history
exampleSite/config.toml
@@ -10,6 +10,16 @@
googleAnalytics = ""
enableRobotsTXT = true
[languages]
  [languages.en]
    title = "My blog"
    weight = 1
    contentDir = "content/en"
  [languages.fr]
    title = "Mon blogue"
    weight = 2
    contentDir = "content/fr"
[sitemap]
  changefreq = "monthly"
  priority = 0.5
exampleSite/content/en/_index.md
exampleSite/content/en/about/_index.md
exampleSite/content/en/contact.md
exampleSite/content/en/post/_index.md
exampleSite/content/en/post/chapter-1.md
exampleSite/content/en/post/chapter-2.md
exampleSite/content/en/post/chapter-3.md
exampleSite/content/en/post/chapter-4.md
exampleSite/content/en/post/chapter-5.md
exampleSite/content/en/post/chapter-6.md
exampleSite/content/fr/_index.md
New file
@@ -0,0 +1,8 @@
---
title: "Ananke: Un thème pour Hugo"
featured_image: '/images/gohugo-default-sample-hero-image.jpg'
description: "Le dernier thème dont vous aurez besoin. Peut-être"
---
Bienvenu sur mon blog!
Vous pouvez lire mes idées de publication plus bas.
exampleSite/content/fr/contact.md
New file
@@ -0,0 +1,14 @@
---
title: Contact
featured_image: "images/notebook.jpg"
omit_header_text: true
description: Laissez-nous un message!
type: page
menu: main
---
This is the French contact page. This is an example of a custom shortcode that you can put right into your content. You will need to add a form action to the the shortcode to make it work. Check out [Formspree](https://formspree.io/) for a simple, free form service.
{{< form-contact action="https://example.com"  >}}
exampleSite/content/fr/post/_index.md
New file
@@ -0,0 +1,5 @@
---
title: "Articles"
date: 2017-03-02T12:00:00-05:00
---
Exemple de liste d'article français.
exampleSite/content/fr/post/chapter-1.md
New file
@@ -0,0 +1,13 @@
---
date: 2017-04-09T10:58:08-04:00
description: "La grande halle"
featured_image: "/images/Pope-Edouard-de-Beaumont-1844.jpg"
tags: ["scene"]
title: "Chapitre I: La grande halle"
---
Généralement, on utilise un texte en faux latin (le texte ne veut rien dire, il a été modifié), le Lorem ipsum ou Lipsum, qui permet donc de faire office de texte d'attente. L'avantage de le mettre en latin est que l'opérateur sait au premier coup d'oeil que la page contenant ces lignes n'est pas valide, et surtout l'attention du client n'est pas dérangée par le contenu, il demeure concentré seulement sur l'aspect graphique.
Ce texte a pour autre avantage d'utiliser des mots de longueur variable, essayant de simuler une occupation normale. La méthode simpliste consistant à copier-coller un court texte plusieurs fois (« ceci est un faux-texte ceci est un faux-texte ceci est un faux-texte ceci est un faux-texte ceci est un faux-texte ») a l'inconvénient de ne pas permettre une juste appréciation typographique du résultat final.
Il circule des centaines de versions différentes du Lorem ipsum, mais ce texte aurait originellement été tiré de l'ouvrage de Cicéron, De Finibus Bonorum et Malorum (Liber Primus, 32), texte populaire à cette époque, dont l'une des premières phrases est : « Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit... » (« Il n'existe personne qui aime la souffrance pour elle-même, ni qui la recherche ni qui la veuille pour ce qu'elle est... »).