examples: Fix multilingual example compatibility with latest version

This commit is contained in:
Robin Andersson 2019-08-01 13:49:07 +02:00 committed by Bjørn Erik Pedersen
parent 53077b0da5
commit b8758de19e
17 changed files with 27 additions and 42 deletions

View file

@ -3,7 +3,6 @@ baseURL = "http://example.com"
defaultContentLanguage = "en"
[taxonomies]
group = "groups"
[languages]
[languages.en]
@ -26,14 +25,14 @@ weight = 2
weight = 1
title = "Minu mitmekeelne leht"
[[languages.et.menu.main]]
url = "/kodu"
url = "/et/home"
name = "Kodu"
weight = 0
[[languages.et.menu.main]]
url = "/uudised"
url = "/et/news"
name = "Uudised"
weight = 1
[[languages.et.menu.main]]
url = "/minust"
url = "/et/about"
name = "Minust"
weight = 2

View file

@ -1,6 +1,5 @@
+++
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.

View file

@ -1,6 +1,5 @@
+++
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.

View file

@ -1,6 +1,5 @@
+++
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.

View file

@ -1,6 +1,5 @@
+++
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.

View 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.

View 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.

View file

@ -1,6 +1,5 @@
+++
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.

View file

@ -1,7 +1,5 @@
+++
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.

View file

@ -1,6 +1,5 @@
+++
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.

View file

@ -1,7 +1,5 @@
+++
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.

View file

@ -1,5 +0,0 @@
+++
title = "News"
url = "/news"
listing = true
+++

View file

@ -1,5 +0,0 @@
+++
title = "Uudised"
url = "/uudised"
listing = true
+++

View 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" . }}

View file

@ -1,7 +1,7 @@
<header>
<nav id="language-menu">
<a href="/home">English</a>
<a href="/kodu">Eesti</a>
<a href="/et/home">Eesti</a>
</nav>
<h1 id="title">{{ .Site.Title }}</h1>

View file

@ -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" . }}