diff options
author | Robin Andersson <me@robinwassen.com> | 2019-08-01 14:49:07 +0300 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-08-01 14:49:07 +0300 |
commit | b8758de19ec75b4565075314f9578270a092bc6f (patch) | |
tree | 82d929e084b3d5dd69f16d81e4da30cd38e306f6 /examples/multilingual | |
parent | 53077b0da54906feee64a03612e5186043e17341 (diff) |
examples: Fix multilingual example compatibility with latest version
Diffstat (limited to 'examples/multilingual')
17 files changed, 27 insertions, 42 deletions
diff --git a/examples/multilingual/config.toml b/examples/multilingual/config.toml index 2c285f0e0..b6048f0d1 100644 --- a/examples/multilingual/config.toml +++ b/examples/multilingual/config.toml @@ -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 diff --git a/examples/multilingual/content/about.en.md b/examples/multilingual/content/about.en.md index c125eea52..8ff94ccc4 100644 --- a/examples/multilingual/content/about.en.md +++ b/examples/multilingual/content/about.en.md @@ -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. diff --git a/examples/multilingual/content/about.et.md b/examples/multilingual/content/about.et.md index 57354e886..d6cada1e1 100644 --- a/examples/multilingual/content/about.et.md +++ b/examples/multilingual/content/about.et.md @@ -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. diff --git a/examples/multilingual/content/index.en.md b/examples/multilingual/content/home.en.md index 04ce0e544..feca4d971 100644 --- a/examples/multilingual/content/index.en.md +++ b/examples/multilingual/content/home.en.md @@ -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. diff --git a/examples/multilingual/content/index.et.md b/examples/multilingual/content/home.et.md index eee0da2a2..38f72bc80 100644 --- a/examples/multilingual/content/index.et.md +++ b/examples/multilingual/content/home.et.md @@ -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. diff --git a/examples/multilingual/content/news/_index.en.md b/examples/multilingual/content/news/_index.en.md new file mode 100644 index 000000000..e77a5fe4c --- /dev/null +++ b/examples/multilingual/content/news/_index.en.md @@ -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. diff --git a/examples/multilingual/content/news/_index.et.md b/examples/multilingual/content/news/_index.et.md new file mode 100644 index 000000000..7f3b7b301 --- /dev/null +++ b/examples/multilingual/content/news/_index.et.md @@ -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. diff --git a/examples/multilingual/content/story/alpha.en.md b/examples/multilingual/content/news/alpha.en.md index 9cd84f6d1..244187e7c 100644 --- a/examples/multilingual/content/story/alpha.en.md +++ b/examples/multilingual/content/news/alpha.en.md @@ -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. diff --git a/examples/multilingual/content/uudis/alfa.et.md b/examples/multilingual/content/news/alpha.et.md index c7ecdd823..18b40564f 100644 --- a/examples/multilingual/content/uudis/alfa.et.md +++ b/examples/multilingual/content/news/alpha.et.md @@ -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. diff --git a/examples/multilingual/content/story/beta.en.md b/examples/multilingual/content/news/beta.en.md index 74cd9be3c..329832b8d 100644 --- a/examples/multilingual/content/story/beta.en.md +++ b/examples/multilingual/content/news/beta.en.md @@ -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. diff --git a/examples/multilingual/content/uudis/beeta.et.md b/examples/multilingual/content/news/beta.et.md index b50cb4c4c..653f7e02e 100644 --- a/examples/multilingual/content/uudis/beeta.et.md +++ b/examples/multilingual/content/news/beta.et.md @@ -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. diff --git a/examples/multilingual/content/story/index.en.md b/examples/multilingual/content/story/index.en.md deleted file mode 100644 index 5eaf8e7c2..000000000 --- a/examples/multilingual/content/story/index.en.md +++ /dev/null @@ -1,5 +0,0 @@ -+++ -title = "News" -url = "/news" -listing = true -+++ diff --git a/examples/multilingual/content/uudis/index.et.md b/examples/multilingual/content/uudis/index.et.md deleted file mode 100644 index 4363c2f6a..000000000 --- a/examples/multilingual/content/uudis/index.et.md +++ /dev/null @@ -1,5 +0,0 @@ -+++ -title = "Uudised" -url = "/uudised" -listing = true -+++ diff --git a/examples/multilingual/layouts/_default/list.html b/examples/multilingual/layouts/_default/list.html new file mode 100644 index 000000000..e585d92ca --- /dev/null +++ b/examples/multilingual/layouts/_default/list.html @@ -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" . }} diff --git a/examples/multilingual/layouts/story/single.html b/examples/multilingual/layouts/news/single.html index beb811cc2..beb811cc2 100644 --- a/examples/multilingual/layouts/story/single.html +++ b/examples/multilingual/layouts/news/single.html diff --git a/examples/multilingual/layouts/partials/header.html b/examples/multilingual/layouts/partials/header.html index 15f67ba72..cd992bbad 100644 --- a/examples/multilingual/layouts/partials/header.html +++ b/examples/multilingual/layouts/partials/header.html @@ -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> diff --git a/examples/multilingual/layouts/uudis/single.html b/examples/multilingual/layouts/uudis/single.html deleted file mode 100644 index 1af874d2a..000000000 --- a/examples/multilingual/layouts/uudis/single.html +++ /dev/null @@ -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" . }} |