From b8758de19ec75b4565075314f9578270a092bc6f Mon Sep 17 00:00:00 2001 From: Robin Andersson Date: Thu, 1 Aug 2019 13:49:07 +0200 Subject: [PATCH] examples: Fix multilingual example compatibility with latest version --- examples/multilingual/config.toml | 7 +++---- examples/multilingual/content/about.en.md | 1 - examples/multilingual/content/about.et.md | 1 - .../content/{index.en.md => home.en.md} | 1 - .../content/{index.et.md => home.et.md} | 1 - examples/multilingual/content/news/_index.en.md | 5 +++++ examples/multilingual/content/news/_index.et.md | 5 +++++ .../content/{story => news}/alpha.en.md | 1 - .../{uudis/alfa.et.md => news/alpha.et.md} | 2 -- .../content/{story => news}/beta.en.md | 1 - .../{uudis/beeta.et.md => news/beta.et.md} | 2 -- examples/multilingual/content/story/index.en.md | 5 ----- examples/multilingual/content/uudis/index.et.md | 5 ----- .../multilingual/layouts/_default/list.html | 13 +++++++++++++ .../layouts/{story => news}/single.html | 0 .../multilingual/layouts/partials/header.html | 2 +- examples/multilingual/layouts/uudis/single.html | 17 ----------------- 17 files changed, 27 insertions(+), 42 deletions(-) rename examples/multilingual/content/{index.en.md => home.en.md} (98%) rename examples/multilingual/content/{index.et.md => home.et.md} (98%) create mode 100644 examples/multilingual/content/news/_index.en.md create mode 100644 examples/multilingual/content/news/_index.et.md rename examples/multilingual/content/{story => news}/alpha.en.md (98%) rename examples/multilingual/content/{uudis/alfa.et.md => news/alpha.et.md} (96%) rename examples/multilingual/content/{story => news}/beta.en.md (98%) rename examples/multilingual/content/{uudis/beeta.et.md => news/beta.et.md} (96%) delete mode 100644 examples/multilingual/content/story/index.en.md delete mode 100644 examples/multilingual/content/uudis/index.et.md create mode 100644 examples/multilingual/layouts/_default/list.html rename examples/multilingual/layouts/{story => news}/single.html (100%) delete mode 100644 examples/multilingual/layouts/uudis/single.html diff --git a/examples/multilingual/config.toml b/examples/multilingual/config.toml index 2c285f0e..b6048f0d 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 c125eea5..8ff94ccc 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 57354e88..d6cada1e 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 similarity index 98% rename from examples/multilingual/content/index.en.md rename to examples/multilingual/content/home.en.md index 04ce0e54..feca4d97 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 similarity index 98% rename from examples/multilingual/content/index.et.md rename to examples/multilingual/content/home.et.md index eee0da2a..38f72bc8 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 00000000..e77a5fe4 --- /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 00000000..7f3b7b30 --- /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 similarity index 98% rename from examples/multilingual/content/story/alpha.en.md rename to examples/multilingual/content/news/alpha.en.md index 9cd84f6d..244187e7 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 similarity index 96% rename from examples/multilingual/content/uudis/alfa.et.md rename to examples/multilingual/content/news/alpha.et.md index c7ecdd82..18b40564 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 similarity index 98% rename from examples/multilingual/content/story/beta.en.md rename to examples/multilingual/content/news/beta.en.md index 74cd9be3..329832b8 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 similarity index 96% rename from examples/multilingual/content/uudis/beeta.et.md rename to examples/multilingual/content/news/beta.et.md index b50cb4c4..653f7e02 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 5eaf8e7c..00000000 --- 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 4363c2f6..00000000 --- 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 00000000..e585d92c --- /dev/null +++ b/examples/multilingual/layouts/_default/list.html @@ -0,0 +1,13 @@ +{{ partial "head.html" . }} +{{ partial "header.html" . }} +{{ .Content }} + + + +{{ partial "footer.html" . }} diff --git a/examples/multilingual/layouts/story/single.html b/examples/multilingual/layouts/news/single.html similarity index 100% rename from examples/multilingual/layouts/story/single.html rename to examples/multilingual/layouts/news/single.html diff --git a/examples/multilingual/layouts/partials/header.html b/examples/multilingual/layouts/partials/header.html index 15f67ba7..cd992bba 100644 --- a/examples/multilingual/layouts/partials/header.html +++ b/examples/multilingual/layouts/partials/header.html @@ -1,7 +1,7 @@

{{ .Site.Title }}

diff --git a/examples/multilingual/layouts/uudis/single.html b/examples/multilingual/layouts/uudis/single.html deleted file mode 100644 index 1af874d2..00000000 --- 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 }} - - {{ end }} -{{ else }} - {{ .Content }} -{{ end }} - -{{ partial "footer.html" . }} -- 2.30.2