mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
parent
4c72eb12dc
commit
68ebf61613
25 changed files with 312 additions and 314 deletions
|
@ -1,6 +1,39 @@
|
|||
baseURL = "http://example.com"
|
||||
|
||||
defaultContentLanguage = "en"
|
||||
|
||||
[taxonomies]
|
||||
tag = "tags"
|
||||
group = "groups"
|
||||
menu = "menu"
|
||||
|
||||
[languages]
|
||||
[languages.en]
|
||||
weight = 0
|
||||
title = "My multilingual site"
|
||||
[[languages.en.menu.main]]
|
||||
url = "/home"
|
||||
name = "Home"
|
||||
weight = 0
|
||||
[[languages.en.menu.main]]
|
||||
url = "/news"
|
||||
name = "News"
|
||||
weight = 1
|
||||
[[languages.en.menu.main]]
|
||||
url = "/about"
|
||||
name = "About"
|
||||
weight = 2
|
||||
|
||||
[languages.et]
|
||||
weight = 1
|
||||
title = "Minu mitmekeelne leht"
|
||||
[[languages.et.menu.main]]
|
||||
url = "/kodu"
|
||||
name = "Kodu"
|
||||
weight = 0
|
||||
[[languages.et.menu.main]]
|
||||
url = "/uudised"
|
||||
name = "Uudised"
|
||||
weight = 1
|
||||
[[languages.et.menu.main]]
|
||||
url = "/minust"
|
||||
name = "Minust"
|
||||
weight = 2
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
+++
|
||||
title = "About"
|
||||
linktitle = "About"
|
||||
url = "/about"
|
||||
|
||||
lang = "en"
|
||||
menu = ["en"]
|
||||
menu_weight = 30
|
||||
+++
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illum ex deleniti ut tenetur amet accusantium dolores nam provident! Ipsum, dicta voluptatum quas architecto nostrum sapiente eos commodi numquam accusantium reprehenderit.
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
+++
|
||||
title = "Minust"
|
||||
linktitle = "Minust"
|
||||
url = "/minust"
|
||||
|
||||
lang = "et"
|
||||
menu = ["et"]
|
||||
menu_weight = 30
|
||||
+++
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illum ex deleniti ut tenetur amet accusantium dolores nam provident! Ipsum, dicta voluptatum quas architecto nostrum sapiente eos commodi numquam accusantium reprehenderit.
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
+++
|
||||
title = "Home"
|
||||
linktitle = "Home"
|
||||
url = "/home"
|
||||
|
||||
lang = "en"
|
||||
menu = ["en"]
|
||||
menu_weight = 0
|
||||
+++
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illum ex deleniti ut tenetur amet accusantium dolores nam provident! Ipsum, dicta voluptatum quas architecto nostrum sapiente eos commodi numquam accusantium reprehenderit.
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
+++
|
||||
title = "Kodu"
|
||||
linktitle = "Kodu"
|
||||
url = "/kodu"
|
||||
|
||||
lang = "et"
|
||||
menu = ["et"]
|
||||
menu_weight = 0
|
||||
+++
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illum ex deleniti ut tenetur amet accusantium dolores nam provident! Ipsum, dicta voluptatum quas architecto nostrum sapiente eos commodi numquam accusantium reprehenderit.
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
+++
|
||||
title = "Alpha"
|
||||
|
||||
lang = "en"
|
||||
groups = ["news"]
|
||||
+++
|
||||
|
|
@ -1,7 +1,5 @@
|
|||
+++
|
||||
title = "Beta"
|
||||
|
||||
lang = "en"
|
||||
groups = ["news"]
|
||||
+++
|
||||
|
5
examples/multilingual/content/story/index.en.md
Normal file
5
examples/multilingual/content/story/index.en.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
+++
|
||||
title = "News"
|
||||
url = "/news"
|
||||
listing = true
|
||||
+++
|
|
@ -1,10 +0,0 @@
|
|||
+++
|
||||
title = "News"
|
||||
linktitle = "News"
|
||||
url = "/news"
|
||||
|
||||
listing = true
|
||||
lang = "en"
|
||||
menu = ["en"]
|
||||
menu_weight = 10
|
||||
+++
|
|
@ -1,7 +1,6 @@
|
|||
+++
|
||||
title = "Alfa"
|
||||
|
||||
lang = "et"
|
||||
url = "/uudis/alfa"
|
||||
groups = ["uudised"]
|
||||
+++
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
+++
|
||||
title = "Beeta"
|
||||
|
||||
lang = "et"
|
||||
url = "/uudis/beeta"
|
||||
groups = ["uudised"]
|
||||
+++
|
||||
|
5
examples/multilingual/content/uudis/index.et.md
Normal file
5
examples/multilingual/content/uudis/index.et.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
+++
|
||||
title = "Uudised"
|
||||
url = "/uudised"
|
||||
listing = true
|
||||
+++
|
|
@ -1,10 +0,0 @@
|
|||
+++
|
||||
title = "Uudised"
|
||||
linktitle = "Uudised"
|
||||
url = "/uudised"
|
||||
|
||||
listing = true
|
||||
lang = "et"
|
||||
menu = ["et"]
|
||||
menu_weight = 10
|
||||
+++
|
|
@ -1,2 +0,0 @@
|
|||
head_title: Multilingual
|
||||
title: My multilingual site
|
|
@ -1,2 +0,0 @@
|
|||
head_title: Mitmekeelne
|
||||
title: Minu mitmekeelne leht
|
3
examples/multilingual/i18n/en.yaml
Normal file
3
examples/multilingual/i18n/en.yaml
Normal file
|
@ -0,0 +1,3 @@
|
|||
- id: head_title
|
||||
translation: "Multilingual"
|
||||
|
2
examples/multilingual/i18n/et.yaml
Normal file
2
examples/multilingual/i18n/et.yaml
Normal file
|
@ -0,0 +1,2 @@
|
|||
- id: head_title
|
||||
translation: "Mitmekeelne"
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
{{ if .Title }}
|
||||
<title>{{ (index .Site.Data.translations .Params.lang).head_title }} - {{ .Title }}</title>
|
||||
<title>{{ i18n "head_title" }} - {{ .Title }}</title>
|
||||
{{ end }}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="/main.css">
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
<a href="/kodu">Eesti</a>
|
||||
</nav>
|
||||
|
||||
<h1 id="title">{{ (index .Site.Data.translations .Params.lang).title }}</h1>
|
||||
<h1 id="title">{{ .Site.Title }}</h1>
|
||||
|
||||
<nav id="main-menu">
|
||||
{{ range (index .Site.Taxonomies.menu .Params.lang).Pages }}
|
||||
<a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
|
||||
{{ range .Site.Menus.main }}
|
||||
<a href="{{ .URL }}">{{ .Name }}</a>
|
||||
{{ end }}
|
||||
<div class="clear"></div>
|
||||
</nav>
|
||||
|
|
Loading…
Reference in a new issue