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"
|
baseURL = "http://example.com"
|
||||||
|
|
||||||
|
defaultContentLanguage = "en"
|
||||||
|
|
||||||
[taxonomies]
|
[taxonomies]
|
||||||
tag = "tags"
|
|
||||||
group = "groups"
|
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"
|
title = "About"
|
||||||
linktitle = "About"
|
|
||||||
url = "/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.
|
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"
|
title = "Minust"
|
||||||
linktitle = "Minust"
|
|
||||||
url = "/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.
|
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"
|
title = "Home"
|
||||||
linktitle = "Home"
|
|
||||||
url = "/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.
|
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"
|
title = "Kodu"
|
||||||
linktitle = "Kodu"
|
|
||||||
url = "/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.
|
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"
|
title = "Alpha"
|
||||||
|
|
||||||
lang = "en"
|
|
||||||
groups = ["news"]
|
groups = ["news"]
|
||||||
+++
|
+++
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
+++
|
+++
|
||||||
title = "Beta"
|
title = "Beta"
|
||||||
|
|
||||||
lang = "en"
|
|
||||||
groups = ["news"]
|
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"
|
title = "Alfa"
|
||||||
|
url = "/uudis/alfa"
|
||||||
lang = "et"
|
|
||||||
groups = ["uudised"]
|
groups = ["uudised"]
|
||||||
+++
|
+++
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
+++
|
+++
|
||||||
title = "Beeta"
|
title = "Beeta"
|
||||||
|
url = "/uudis/beeta"
|
||||||
lang = "et"
|
|
||||||
groups = ["uudised"]
|
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"
|
|
@ -1,3 +1,3 @@
|
||||||
<footer id="footer"><span class="copy-left">©</span> 2015 Egon Elbre</footer>
|
<footer id="footer"><span class="copy-left">©</span> 2015 Egon Elbre</footer>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
|
@ -3,7 +3,7 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
{{ if .Title }}
|
{{ if .Title }}
|
||||||
<title>{{ (index .Site.Data.translations .Params.lang).head_title }} - {{ .Title }}</title>
|
<title>{{ i18n "head_title" }} - {{ .Title }}</title>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link rel="stylesheet" href="/main.css">
|
<link rel="stylesheet" href="/main.css">
|
||||||
|
|
|
@ -4,11 +4,11 @@
|
||||||
<a href="/kodu">Eesti</a>
|
<a href="/kodu">Eesti</a>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<h1 id="title">{{ (index .Site.Data.translations .Params.lang).title }}</h1>
|
<h1 id="title">{{ .Site.Title }}</h1>
|
||||||
|
|
||||||
<nav id="main-menu">
|
<nav id="main-menu">
|
||||||
{{ range (index .Site.Taxonomies.menu .Params.lang).Pages }}
|
{{ range .Site.Menus.main }}
|
||||||
<a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
|
<a href="{{ .URL }}">{{ .Name }}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
Loading…
Reference in a new issue