mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
examples: Fix multilingual example compatibility with latest version
This commit is contained in:
parent
53077b0da5
commit
b8758de19e
17 changed files with 27 additions and 42 deletions
|
@ -3,7 +3,6 @@ baseURL = "http://example.com"
|
||||||
defaultContentLanguage = "en"
|
defaultContentLanguage = "en"
|
||||||
|
|
||||||
[taxonomies]
|
[taxonomies]
|
||||||
group = "groups"
|
|
||||||
|
|
||||||
[languages]
|
[languages]
|
||||||
[languages.en]
|
[languages.en]
|
||||||
|
@ -26,14 +25,14 @@ weight = 2
|
||||||
weight = 1
|
weight = 1
|
||||||
title = "Minu mitmekeelne leht"
|
title = "Minu mitmekeelne leht"
|
||||||
[[languages.et.menu.main]]
|
[[languages.et.menu.main]]
|
||||||
url = "/kodu"
|
url = "/et/home"
|
||||||
name = "Kodu"
|
name = "Kodu"
|
||||||
weight = 0
|
weight = 0
|
||||||
[[languages.et.menu.main]]
|
[[languages.et.menu.main]]
|
||||||
url = "/uudised"
|
url = "/et/news"
|
||||||
name = "Uudised"
|
name = "Uudised"
|
||||||
weight = 1
|
weight = 1
|
||||||
[[languages.et.menu.main]]
|
[[languages.et.menu.main]]
|
||||||
url = "/minust"
|
url = "/et/about"
|
||||||
name = "Minust"
|
name = "Minust"
|
||||||
weight = 2
|
weight = 2
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
+++
|
+++
|
||||||
title = "About"
|
title = "About"
|
||||||
url = "/about"
|
|
||||||
+++
|
+++
|
||||||
|
|
||||||
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,6 +1,5 @@
|
||||||
+++
|
+++
|
||||||
title = "Minust"
|
title = "Minust"
|
||||||
url = "/minust"
|
|
||||||
+++
|
+++
|
||||||
|
|
||||||
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,6 +1,5 @@
|
||||||
+++
|
+++
|
||||||
title = "Home"
|
title = "Home"
|
||||||
url = "/home"
|
|
||||||
+++
|
+++
|
||||||
|
|
||||||
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,6 +1,5 @@
|
||||||
+++
|
+++
|
||||||
title = "Kodu"
|
title = "Kodu"
|
||||||
url = "/kodu"
|
|
||||||
+++
|
+++
|
||||||
|
|
||||||
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.
|
5
examples/multilingual/content/news/_index.en.md
Normal file
5
examples/multilingual/content/news/_index.en.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
+++
|
||||||
|
title = "News"
|
||||||
|
+++
|
||||||
|
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ratione, porro, doloribus ducimus reprehenderit nobis at voluptates ipsa dicta nostrum perferendis in vitae. Magnam, quia officia modi incidunt tenetur ratione cum.
|
5
examples/multilingual/content/news/_index.et.md
Normal file
5
examples/multilingual/content/news/_index.et.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
+++
|
||||||
|
title = "Uudised"
|
||||||
|
+++
|
||||||
|
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ratione, porro, doloribus ducimus reprehenderit nobis at voluptates ipsa dicta nostrum perferendis in vitae. Magnam, quia officia modi incidunt tenetur ratione cum.
|
|
@ -1,6 +1,5 @@
|
||||||
+++
|
+++
|
||||||
title = "Alpha"
|
title = "Alpha"
|
||||||
groups = ["news"]
|
|
||||||
+++
|
+++
|
||||||
|
|
||||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ratione, porro, doloribus ducimus reprehenderit nobis at voluptates ipsa dicta nostrum perferendis in vitae. Magnam, quia officia modi incidunt tenetur ratione cum.
|
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ratione, porro, doloribus ducimus reprehenderit nobis at voluptates ipsa dicta nostrum perferendis in vitae. Magnam, quia officia modi incidunt tenetur ratione cum.
|
|
@ -1,7 +1,5 @@
|
||||||
+++
|
+++
|
||||||
title = "Alfa"
|
title = "Alfa"
|
||||||
url = "/uudis/alfa"
|
|
||||||
groups = ["uudised"]
|
|
||||||
+++
|
+++
|
||||||
|
|
||||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ratione, porro, doloribus ducimus reprehenderit nobis at voluptates ipsa dicta nostrum perferendis in vitae. Magnam, quia officia modi incidunt tenetur ratione cum.
|
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ratione, porro, doloribus ducimus reprehenderit nobis at voluptates ipsa dicta nostrum perferendis in vitae. Magnam, quia officia modi incidunt tenetur ratione cum.
|
|
@ -1,6 +1,5 @@
|
||||||
+++
|
+++
|
||||||
title = "Beta"
|
title = "Beta"
|
||||||
groups = ["news"]
|
|
||||||
+++
|
+++
|
||||||
|
|
||||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ratione, porro, doloribus ducimus reprehenderit nobis at voluptates ipsa dicta nostrum perferendis in vitae. Magnam, quia officia modi incidunt tenetur ratione cum.
|
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ratione, porro, doloribus ducimus reprehenderit nobis at voluptates ipsa dicta nostrum perferendis in vitae. Magnam, quia officia modi incidunt tenetur ratione cum.
|
|
@ -1,7 +1,5 @@
|
||||||
+++
|
+++
|
||||||
title = "Beeta"
|
title = "Beeta"
|
||||||
url = "/uudis/beeta"
|
|
||||||
groups = ["uudised"]
|
|
||||||
+++
|
+++
|
||||||
|
|
||||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ratione, porro, doloribus ducimus reprehenderit nobis at voluptates ipsa dicta nostrum perferendis in vitae. Magnam, quia officia modi incidunt tenetur ratione cum.
|
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ratione, porro, doloribus ducimus reprehenderit nobis at voluptates ipsa dicta nostrum perferendis in vitae. Magnam, quia officia modi incidunt tenetur ratione cum.
|
|
@ -1,5 +0,0 @@
|
||||||
+++
|
|
||||||
title = "News"
|
|
||||||
url = "/news"
|
|
||||||
listing = true
|
|
||||||
+++
|
|
|
@ -1,5 +0,0 @@
|
||||||
+++
|
|
||||||
title = "Uudised"
|
|
||||||
url = "/uudised"
|
|
||||||
listing = true
|
|
||||||
+++
|
|
13
examples/multilingual/layouts/_default/list.html
Normal file
13
examples/multilingual/layouts/_default/list.html
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{{ partial "head.html" . }}
|
||||||
|
{{ partial "header.html" . }}
|
||||||
|
{{ .Content }}
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
{{ range .Pages }}
|
||||||
|
<li>
|
||||||
|
<a href="{{.Permalink}}">{{.Title}}</a>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
{{ partial "footer.html" . }}
|
|
@ -1,7 +1,7 @@
|
||||||
<header>
|
<header>
|
||||||
<nav id="language-menu">
|
<nav id="language-menu">
|
||||||
<a href="/home">English</a>
|
<a href="/home">English</a>
|
||||||
<a href="/kodu">Eesti</a>
|
<a href="/et/home">Eesti</a>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<h1 id="title">{{ .Site.Title }}</h1>
|
<h1 id="title">{{ .Site.Title }}</h1>
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
{{ partial "head.html" . }}
|
|
||||||
{{ partial "header.html" . }}
|
|
||||||
|
|
||||||
{{ if .Params.listing }}
|
|
||||||
{{ range .Site.Taxonomies.groups.uudised.Pages }}
|
|
||||||
<article class="post">
|
|
||||||
<h3><a href='{{ .Permalink }}'>{{ .Title }}</a> </h3>
|
|
||||||
<div class="post-meta">{{ .Date.Format "Mon, Jan 2, 2006" }} - {{ .FuzzyWordCount }} sõna</div>
|
|
||||||
{{ .Summary }}
|
|
||||||
<a href='{{ .Permalink }}'><nobr>loe edasi →</nobr></a>
|
|
||||||
</article>
|
|
||||||
{{ end }}
|
|
||||||
{{ else }}
|
|
||||||
{{ .Content }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ partial "footer.html" . }}
|
|
Loading…
Reference in a new issue