Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/danielkvist/hugo-terrassa-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel <danielkvist@protonmail.com>2020-06-07 19:58:58 +0300
committerGitHub <noreply@github.com>2020-06-07 19:58:58 +0300
commit5d57068eb8370c7648491ab7c47b6b28d8a6b835 (patch)
treef269bc5caaf7aaded68e6edc180ffc4cc779320f
parenta0ad0c63ab122e6df05f13a27ea06ccdcb37334a (diff)
parent623301f963cedf4f85d054bf2ddb7861a2b9fea3 (diff)
Merge pull request #25 from feministclickback/multilingual-supportv2.5
Multilingual support
-rw-r--r--README.md63
-rw-r--r--assets/css/style.css26
-rw-r--r--exampleSite/config.toml30
-rw-r--r--exampleSite/content/de/_index.md11
-rw-r--r--exampleSite/content/de/about.md19
-rw-r--r--exampleSite/content/de/contact/_index.md9
-rw-r--r--exampleSite/content/de/posts/16-things-free-songs.md (renamed from exampleSite/content/posts/16-things-free-songs.md)0
-rw-r--r--exampleSite/content/de/posts/_index.md9
-rw-r--r--exampleSite/content/de/posts/bad-architects.md (renamed from exampleSite/content/posts/bad-architects.md)0
-rw-r--r--exampleSite/content/de/posts/game-websites/images/dummy-image.jpg (renamed from exampleSite/content/posts/game-websites/images/dummy-image.jpg)bin4370078 -> 4370078 bytes
-rw-r--r--exampleSite/content/de/posts/game-websites/index.md (renamed from exampleSite/content/posts/game-websites/index.md)0
-rw-r--r--exampleSite/content/de/posts/preventative-medicines.md (renamed from exampleSite/content/posts/preventative-medicines.md)0
-rw-r--r--exampleSite/content/de/sections/simple-choices.md (renamed from exampleSite/content/sections/simple-choices.md)0
-rw-r--r--exampleSite/content/de/sections/simple-people.md (renamed from exampleSite/content/sections/simple-people.md)0
-rw-r--r--exampleSite/content/de/sections/simple-values.md (renamed from exampleSite/content/sections/simple-values.md)0
-rw-r--r--exampleSite/content/de/sections/simple.md (renamed from exampleSite/content/sections/simple.md)0
-rw-r--r--exampleSite/content/en/_index.md (renamed from exampleSite/content/_index.md)0
-rw-r--r--exampleSite/content/en/about.md (renamed from exampleSite/content/about.md)0
-rw-r--r--exampleSite/content/en/contact/_index.md (renamed from exampleSite/content/contact/_index.md)0
-rw-r--r--exampleSite/content/en/posts/16-things-free-songs.md20
-rw-r--r--exampleSite/content/en/posts/_index.md (renamed from exampleSite/content/posts/_index.md)0
-rw-r--r--exampleSite/content/en/posts/bad-architects.md30
-rw-r--r--exampleSite/content/en/posts/game-websites/images/dummy-image.jpgbin0 -> 4370078 bytes
-rw-r--r--exampleSite/content/en/posts/game-websites/index.md24
-rw-r--r--exampleSite/content/en/posts/preventative-medicines.md18
-rw-r--r--exampleSite/content/en/sections/simple-choices.md8
-rw-r--r--exampleSite/content/en/sections/simple-people.md10
-rw-r--r--exampleSite/content/en/sections/simple-values.md8
-rw-r--r--exampleSite/content/en/sections/simple.md8
-rw-r--r--layouts/_default/baseof.html4
-rw-r--r--layouts/partials/head.html13
-rw-r--r--layouts/partials/header.html9
-rw-r--r--layouts/partials/language-switcher.html16
33 files changed, 326 insertions, 9 deletions
diff --git a/README.md b/README.md
index f7aa266..ed48dd9 100644
--- a/README.md
+++ b/README.md
@@ -14,6 +14,7 @@ Terrassa is a simple, fast and responsive theme for Hugo with a strong focus on
- Customizable call to action on the home page.
- Contact form.
- Ready for blogging.
+- Multilingual Support
## Some things that will be added in the future
@@ -86,7 +87,7 @@ There's a lot more information about the basic configuration of an Hugo site [he
### Call To Action
```toml
-[params.cta] # Call To Action
+[params.cta] # Call To Action
show = true
cta = "Contact" # Text message of the CTA
link = "contact" # Relative URL
@@ -327,4 +328,62 @@ For the contact page follow these instructions:
$ hugo new contact/_index.md -k page
```
-The *title* and *description* will be used as the main title and subtitle respectively with a contact form. The rest of the options are defined in the [config.toml](https://github.com/danielkvist/hugo-terrassa-theme/blob/master/exampleSite/config.toml). \ No newline at end of file
+The *title* and *description* will be used as the main title and subtitle respectively with a contact form. The rest of the options are defined in the [config.toml](https://github.com/danielkvist/hugo-terrassa-theme/blob/master/exampleSite/config.toml).
+
+## Multilingual Support
+
+If your site is multilingual, add each language to your config.toml parameters with the following structure:
+
+```bash
+[languages]
+ [languages.en]
+ languageName = "en"
+ weight = 1
+ contentDir = "content/en"
+ [languages.de]
+ languageName = "de"
+ weight = 2
+ contentDir = "content/de"
+ [languages.de]
+ languageName = "de"
+ weight = 3
+ contentDir = "content/fr"
+```
+
+The theme assumes you have one default language, defined in config.toml as defaultContentLanguage. These pages will be at root of the URL, while the other languages will be in their own subdirectory.
+
+You can overwrite all Site parameters in config.url by adding them to the respective language, for example:
+
+```bash
+[languages.de]
+ languageName = "de"
+ weight = 2
+ contentDir = "content/de"
+ title = "Das ist der deutsche Titel"
+ description = "Das ist die deutsche Beschreibung"
+```
+
+For translating the contact form, add these parameters:
+
+```bash
+[languages.de.params]
+ [languages.de.params.form] # Translate contact form fields
+ inputNameLabel = "Name"
+ inputNamePlaceholder = "Dein Name"
+ inputEmailLabel = "E-mail"
+ inputEmailPlaceholder = "Deine E-Mail-Adresse"
+ inputMsgLabel = "Schreib etwas"
+ inputSubmitValue = "Abschicken"
+ [languages.de.params.cta] # Translate Call To Action
+ show = true
+ cta = "Kontakt"
+ link = "de/kontakt/" # Relative URL
+```
+
+Activate the language switcher in the header by setting:
+
+```bash
+[params.languageSwitcher]
+ show = true
+```
+Read more about Hugo's Multilingual mode here: https://gohugo.io/content-management/multilingual/
diff --git a/assets/css/style.css b/assets/css/style.css
index e669447..f505ee0 100644
--- a/assets/css/style.css
+++ b/assets/css/style.css
@@ -583,3 +583,29 @@
transform: scale(0, 0);
transition: 0s;
}
+
+/* LANGUAGE SWITCHER */
+.LangNav {
+ display: flex;
+ justify-content: flex-end;
+ align-items: center;
+ margin: 1rem 4.5rem;
+}
+
+.LangNav span:not(:last-child)::after {
+ content: "|";
+ margin: 0 0.2rem;
+}
+span.language.active {
+ opacity: 0.5;
+}
+
+.header.has-LangNav {
+ grid-template-columns: auto 1fr auto;
+}
+
+@media (max-width:768px) {
+ .header.has-LangNav .hamburger-menu .toggle {
+ right: 1.75rem;
+ }
+}
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index efde359..d3ee3ad 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -3,7 +3,6 @@ title = "Terrassa"
author = "Daniel Zaragoza (Danielkvist)"
googleAnalytics = ""
defaultContentLanguage = "en"
-language = "en-US"
paginate = 3
theme = "hugo-terrassa-theme"
@@ -17,7 +16,7 @@ themesDir = "../.." # Not necessary on production sites
[params.hero]
textColor = "" # Empty for default color
-[params.cta] # Call To Action
+[params.cta] # Call To Action
show = true
cta = "Contact"
link = "contact" # Relative URL
@@ -94,3 +93,30 @@ themesDir = "../.." # Not necessary on production sites
[privacy.youtube]
disable = false
privacyEnhanced = true
+
+[params.languageSwitcher]
+ show = true
+
+[languages]
+ [languages.en]
+ languageName = "en"
+ weight = 1
+ contentDir = "content/en"
+ [languages.de]
+ languageName = "de"
+ weight = 2
+ contentDir = "content/de"
+ title = "Das ist der deutsche Titel"
+ description = "Das ist die deutsche Beschreibung"
+ [languages.de.params]
+ [languages.de.params.form] # Translate contact form fields
+ inputNameLabel = "Name"
+ inputNamePlaceholder = "Dein Name"
+ inputEmailLabel = "E-mail"
+ inputEmailPlaceholder = "Deine E-Mail-Adresse"
+ inputMsgLabel = "Schreib etwas"
+ inputSubmitValue = "Abschicken"
+ [languages.de.params.cta] # Translate Call To Action
+ show = true
+ cta = "Kontakt"
+ link = "de/kontakt/" # Relative URL
diff --git a/exampleSite/content/de/_index.md b/exampleSite/content/de/_index.md
new file mode 100644
index 0000000..3adbe35
--- /dev/null
+++ b/exampleSite/content/de/_index.md
@@ -0,0 +1,11 @@
+---
+title: "Home"
+description: ""
+images: ["undraw_freelancer_b0my.svg"]
+draft: false
+menu: main
+weight: 1
+---
+
+# Terrassa
+## Das Hugo Theme für dich. Oder dein Unternehmen.
diff --git a/exampleSite/content/de/about.md b/exampleSite/content/de/about.md
new file mode 100644
index 0000000..53205ed
--- /dev/null
+++ b/exampleSite/content/de/about.md
@@ -0,0 +1,19 @@
+---
+title: "Über uns"
+description: ""
+images: []
+draft: false
+menu: main
+weight: 3
+url: /de/ueber-uns/
+---
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Felis donec et odio pellentesque diam. Sapien nec sagittis aliquam malesuada bibendum. Velit dignissim sodales ut eu sem integer vitae justo. Vulputate sapien nec sagittis aliquam malesuada bibendum. Eu ultrices vitae auctor eu augue ut. Amet mattis vulputate enim nulla aliquet porttitor lacus luctus. Mauris in aliquam sem fringilla. Sed faucibus turpis in eu mi bibendum. Nunc consequat interdum varius sit amet mattis vulputate enim. Tincidunt praesent semper feugiat nibh sed pulvinar. Curabitur vitae nunc sed velit dignissim sodales ut eu sem. Arcu odio ut sem nulla pharetra diam sit amet. Vitae justo eget magna fermentum iaculis. Sit amet consectetur adipiscing elit ut aliquam. Suspendisse sed nisi lacus sed viverra tellus in hac. Arcu felis bibendum ut tristique et egestas. Egestas pretium aenean pharetra magna ac placerat vestibulum. Tempus egestas sed sed risus pretium quam vulputate.
+
+Quam nulla porttitor massa id neque. Convallis convallis tellus id interdum velit laoreet id donec ultrices. In mollis nunc sed id semper risus in. Id nibh tortor id aliquet. Amet mattis vulputate enim nulla aliquet porttitor lacus. Eget nulla facilisi etiam dignissim diam quis enim lobortis scelerisque. Interdum consectetur libero id faucibus nisl tincidunt eget nullam. Hac habitasse platea dictumst vestibulum rhoncus est pellentesque. Facilisis mauris sit amet massa vitae tortor. Massa placerat duis ultricies lacus sed. Lectus sit amet est placerat in egestas erat imperdiet. Tempus egestas sed sed risus. Congue eu consequat ac felis donec et odio pellentesque diam. Volutpat lacus laoreet non curabitur gravida arcu. Tortor dignissim convallis aenean et tortor. Pretium vulputate sapien nec sagittis aliquam malesuada bibendum arcu. Sit amet luctus venenatis lectus magna fringilla urna porttitor.
+
+Elementum pulvinar etiam non quam. Vulputate enim nulla aliquet porttitor lacus luctus accumsan tortor posuere. Ut tristique et egestas quis ipsum suspendisse ultrices gravida dictum. Dui ut ornare lectus sit. Commodo sed egestas egestas fringilla phasellus faucibus scelerisque eleifend. Venenatis cras sed felis eget velit. Lectus mauris ultrices eros in cursus turpis massa tincidunt dui. Ac turpis egestas maecenas pharetra convallis posuere morbi leo urna. Sed odio morbi quis commodo odio aenean. Adipiscing at in tellus integer feugiat scelerisque varius. Massa sapien faucibus et molestie ac feugiat sed. Dolor purus non enim praesent elementum facilisis. Vitae suscipit tellus mauris a diam maecenas. Vel fringilla est ullamcorper eget nulla facilisi etiam dignissim diam. Vitae et leo duis ut diam quam. Lectus quam id leo in vitae turpis. Vitae ultricies leo integer malesuada nunc.
+
+Ornare lectus sit amet est placerat in egestas erat. Massa vitae tortor condimentum lacinia quis vel. Ornare massa eget egestas purus. Varius quam quisque id diam vel quam. Convallis tellus id interdum velit. Aenean pharetra magna ac placerat vestibulum. Vitae congue eu consequat ac felis donec et. Dignissim suspendisse in est ante in nibh mauris. Lobortis scelerisque fermentum dui faucibus in ornare. At urna condimentum mattis pellentesque id nibh tortor id. Purus non enim praesent elementum facilisis leo vel. Rutrum quisque non tellus orci ac auctor augue mauris. Eget arcu dictum varius duis at consectetur lorem. Elit scelerisque mauris pellentesque pulvinar pellentesque habitant morbi tristique. Quam pellentesque nec nam aliquam sem. Dignissim convallis aenean et tortor at risus viverra adipiscing at. Ante in nibh mauris cursus. At risus viverra adipiscing at in tellus.
+
+Duis at tellus at urna condimentum. Felis bibendum ut tristique et egestas quis. Diam vel quam elementum pulvinar etiam non quam lacus suspendisse. Dui accumsan sit amet nulla facilisi morbi tempus iaculis. Congue eu consequat ac felis donec et. Mattis pellentesque id nibh tortor id aliquet lectus proin. Interdum varius sit amet mattis vulputate enim nulla. Aenean et tortor at risus viverra adipiscing at in. Diam volutpat commodo sed egestas egestas. Nulla pharetra diam sit amet nisl. Odio pellentesque diam volutpat commodo sed egestas egestas fringilla. Augue interdum velit euismod in pellentesque massa. Tempus egestas sed sed risus. Id semper risus in hendrerit gravida rutrum quisque non. Cras ornare arcu dui vivamus arcu felis bibendum ut. Vitae ultricies leo integer malesuada nunc vel risus commodo viverra. Volutpat diam ut venenatis tellus in metus.
diff --git a/exampleSite/content/de/contact/_index.md b/exampleSite/content/de/contact/_index.md
new file mode 100644
index 0000000..bc861cc
--- /dev/null
+++ b/exampleSite/content/de/contact/_index.md
@@ -0,0 +1,9 @@
+---
+title: "Kontakt"
+description: "Schreib mir eine Nachricht!"
+images: []
+draft: false
+menu: main
+weight: 4
+url: /de/kontakt/
+---
diff --git a/exampleSite/content/posts/16-things-free-songs.md b/exampleSite/content/de/posts/16-things-free-songs.md
index 0c046d8..0c046d8 100644
--- a/exampleSite/content/posts/16-things-free-songs.md
+++ b/exampleSite/content/de/posts/16-things-free-songs.md
diff --git a/exampleSite/content/de/posts/_index.md b/exampleSite/content/de/posts/_index.md
new file mode 100644
index 0000000..e355d13
--- /dev/null
+++ b/exampleSite/content/de/posts/_index.md
@@ -0,0 +1,9 @@
+---
+title: "Blog"
+description: ""
+images: []
+draft: false
+menu: main
+weight: 2
+url: /de/beitraege/
+---
diff --git a/exampleSite/content/posts/bad-architects.md b/exampleSite/content/de/posts/bad-architects.md
index 66bee48..66bee48 100644
--- a/exampleSite/content/posts/bad-architects.md
+++ b/exampleSite/content/de/posts/bad-architects.md
diff --git a/exampleSite/content/posts/game-websites/images/dummy-image.jpg b/exampleSite/content/de/posts/game-websites/images/dummy-image.jpg
index f70edb8..f70edb8 100644
--- a/exampleSite/content/posts/game-websites/images/dummy-image.jpg
+++ b/exampleSite/content/de/posts/game-websites/images/dummy-image.jpg
Binary files differ
diff --git a/exampleSite/content/posts/game-websites/index.md b/exampleSite/content/de/posts/game-websites/index.md
index 5f9f9aa..5f9f9aa 100644
--- a/exampleSite/content/posts/game-websites/index.md
+++ b/exampleSite/content/de/posts/game-websites/index.md
diff --git a/exampleSite/content/posts/preventative-medicines.md b/exampleSite/content/de/posts/preventative-medicines.md
index b7664a3..b7664a3 100644
--- a/exampleSite/content/posts/preventative-medicines.md
+++ b/exampleSite/content/de/posts/preventative-medicines.md
diff --git a/exampleSite/content/sections/simple-choices.md b/exampleSite/content/de/sections/simple-choices.md
index f0304cb..f0304cb 100644
--- a/exampleSite/content/sections/simple-choices.md
+++ b/exampleSite/content/de/sections/simple-choices.md
diff --git a/exampleSite/content/sections/simple-people.md b/exampleSite/content/de/sections/simple-people.md
index 2caed07..2caed07 100644
--- a/exampleSite/content/sections/simple-people.md
+++ b/exampleSite/content/de/sections/simple-people.md
diff --git a/exampleSite/content/sections/simple-values.md b/exampleSite/content/de/sections/simple-values.md
index 872fcde..872fcde 100644
--- a/exampleSite/content/sections/simple-values.md
+++ b/exampleSite/content/de/sections/simple-values.md
diff --git a/exampleSite/content/sections/simple.md b/exampleSite/content/de/sections/simple.md
index 7031576..7031576 100644
--- a/exampleSite/content/sections/simple.md
+++ b/exampleSite/content/de/sections/simple.md
diff --git a/exampleSite/content/_index.md b/exampleSite/content/en/_index.md
index 6aefa55..6aefa55 100644
--- a/exampleSite/content/_index.md
+++ b/exampleSite/content/en/_index.md
diff --git a/exampleSite/content/about.md b/exampleSite/content/en/about.md
index 8bc89c7..8bc89c7 100644
--- a/exampleSite/content/about.md
+++ b/exampleSite/content/en/about.md
diff --git a/exampleSite/content/contact/_index.md b/exampleSite/content/en/contact/_index.md
index 199af07..199af07 100644
--- a/exampleSite/content/contact/_index.md
+++ b/exampleSite/content/en/contact/_index.md
diff --git a/exampleSite/content/en/posts/16-things-free-songs.md b/exampleSite/content/en/posts/16-things-free-songs.md
new file mode 100644
index 0000000..0c046d8
--- /dev/null
+++ b/exampleSite/content/en/posts/16-things-free-songs.md
@@ -0,0 +1,20 @@
+---
+title: "16 things that won't happen in free songs"
+description: "Why country music festivals will change your life."
+date: 2018-12-17T22:21:42+01:00
+publishDate: 2018-12-19T22:21:42+01:00
+author: "John Doe"
+images: []
+draft: false
+tags: ["music", "songs" , "free"]
+---
+
+5 ways country song ringtones can make you rich. [Why country music festivals will change your life](#). The unconventional guide to music notes. Why our world would end if music videos disappeared. 8 insane (but true) things about top country songs. How twitter can teach you about popular songs. 13 facts about latin music videos that'll keep you up at night. Why do people think free dances are a good idea? Why your free song never works out the way you plan. The 6 best music video youtube videos.
+
+> "The unconventional guide to piano stores. Why concert events should be 1 of the 7 deadly sins".
+
+How free dances are making the world a better place. 7 least favorite music videos. 7 ways live shows could leave you needing a lawyer. 11 great articles about popular songs. [7 movies with unbelievable scenes about free songs](#). If you read one article about billboard music awards read this one. 18 ways latin music videos could leave you needing a lawyer. How best rock songs can help you live a better life. The 17 best country music festival twitter feeds to follow. Expose: you're losing money by not using top country songs.
+
+[How jazz coffee bars can help you predict the future](#). What wikipedia can't tell you about music festivals. 10 bs facts about rock bands everyone thinks are true. What the world would be like if summer music festivals didn't exist. How hollywood got latin music videos all wrong. Why pop music books are on crack about pop music books. The evolution of top country songs. How not knowing pop music books makes you a rookie. Why do people think concert tickets are a good idea? How twitter can teach you about jazz coffee bars.
+
+6 ways top country songs can make you rich. [7 facts about summer music festivals that'll keep you up at night](#). 8 problems with free dances. What everyone is saying about music festivals. Free songs by the numbers. Why concert tickets are on crack about concert tickets. 9 problems with live shows. Why popular songs are on crack about popular songs. The unconventional guide to piano stores. Why concert events should be 1 of the 7 deadly sins. \ No newline at end of file
diff --git a/exampleSite/content/posts/_index.md b/exampleSite/content/en/posts/_index.md
index 02c64d7..02c64d7 100644
--- a/exampleSite/content/posts/_index.md
+++ b/exampleSite/content/en/posts/_index.md
diff --git a/exampleSite/content/en/posts/bad-architects.md b/exampleSite/content/en/posts/bad-architects.md
new file mode 100644
index 0000000..66bee48
--- /dev/null
+++ b/exampleSite/content/en/posts/bad-architects.md
@@ -0,0 +1,30 @@
+---
+title: "How architects aren't as bad as you think"
+description: "Why living room ideas are killing you."
+date: 2018-12-16T22:34:04+01:00
+publishDate: 2018-12-19T22:21:42+01:00
+author: "John Doe"
+images: []
+draft: false
+tags: ["health", "music", "architecture"]
+---
+
+6 uses for living room decors. [Why living room ideas are killing you](#). The oddest place you will find decorating ideas. Why the world would end without apartment guides. 12 things that won't happen in interior design ideas. How twitter can teach you about bathroom designs. The 12 best floor plan youtube videos. 9 bs facts about living room decors everyone thinks are true. The only home builder resources you will ever need. How decorating ideas can help you predict the future.
+
+> "Show me the code".
+
+[The 10 best resources for modular homes](#). Home builders by the numbers. *Why you'll never succeed at interior design ideas*. 12 myths uncovered about small house plans. How designer furniture can help you live a better life. Why the world would end without floor plans. How hollywood got interior designs all wrong. An expert interview about kitchen designs. Why our world would end if bathroom designs disappeared. Why mom was right about bathroom designs.
+
+```golang
+package main
+
+import "fmt"
+
+func main() {
+ fmt.Println("Hello, Gopher!")
+}
+```
+
+How building is making the world a better place. **An expert interview about living room ideas**. What everyone is saying about modern living rooms. The 20 best interior design twitter feeds to follow. How to be unpopular in the designer furniture world. [Why mom was right about apartments](#). What the world would be like if kitchen designs didn't exist. The 19 biggest studio apartment blunders. 9 great articles about kitchen planners. How to start using kitchen planners.
+
+Why luxury homes are killing you. 12 least favorite interior designs. How to cheat at luxury homes and get away with it. How floor plans made me a better person. [Why floor plans should be 1 of the 7 deadly sins](#). If you read one article about modern homes read this one. Architectural designs in 11 easy steps. The 19 worst architectural designs in history. How rent houses changed how we think about death. 6 insane (but true) things about small house plans. \ No newline at end of file
diff --git a/exampleSite/content/en/posts/game-websites/images/dummy-image.jpg b/exampleSite/content/en/posts/game-websites/images/dummy-image.jpg
new file mode 100644
index 0000000..f70edb8
--- /dev/null
+++ b/exampleSite/content/en/posts/game-websites/images/dummy-image.jpg
Binary files differ
diff --git a/exampleSite/content/en/posts/game-websites/index.md b/exampleSite/content/en/posts/game-websites/index.md
new file mode 100644
index 0000000..5f9f9aa
--- /dev/null
+++ b/exampleSite/content/en/posts/game-websites/index.md
@@ -0,0 +1,24 @@
+---
+title: "How game websites can help you live a better life"
+description: "The 6 best dish review twitter feeds to follow."
+date: 2018-12-19T22:32:19+01:00
+publishDate: 2018-12-19T22:21:42+01:00
+author: "John Doe"
+images: []
+draft: false
+tags: ["health", "cooking"]
+---
+
+[How to cheat at dish reviews and get away with it](#). The 6 best dish review twitter feeds to follow. The best ways to utilize minute meals. The best ways to utilize safe food handling tips. The best ways to utilize safe food handling tips. 17 facts about food processors that will impress your friends. How cooking healthy food is making the world a better place. Why you'll never succeed at healthy eating facts. 16 things you don't want to hear about chefs. 9 uses for mexican food.
+
+![Dummy image.](./images/dummy-image.jpg)
+
+The unconventional guide to chicken dishes. Why food networks beat peanut butter on pancakes. How fast food isn't as bad as you think. If you read one article about restaurant weeks read this one. Why delicious food is afraid of the truth. Why meatloaf recipes will make you question everything. The oddest place you will find food networks. 16 great articles about breakfast casseroles. Why the next 10 years of healthy cooking tips will smash the last 10. The 16 biggest food network blunders.
+
+{{< figure src="./images/dummy-image.jpg" title="Dummy image using Hugo shortcode." >}}
+
+11 things that won't happen in minute meals. [Why mom was right about mexican food](#). 20 facts about chefs that will impress your friends. 7 uses for delicious food. How to cheat at dish reviews and get away with it. Unbelievable dish review success stories. Why your food network never works out the way you plan. Why food processors are the new black. Why our world would end if healthy lunch ideas disappeared. The 12 best resources for healthy eating facts.
+
+<img src="./images/dummy-image.jpg" alt="Dummy image with HTML.">
+
+14 ways chef uniforms can make you rich. An expert interview about healthy eating facts. 17 things that won't happen in fast food. The 16 worst songs about food stamps. 20 podcasts about thai restaurants. 12 ways easy meals can make you rich. Why restaurant weeks should be 1 of the 7 deadly sins. 15 ideas you can steal from safe food handling tips. Why mexican food is the new black. Why healthy cooking tips are the new black.
diff --git a/exampleSite/content/en/posts/preventative-medicines.md b/exampleSite/content/en/posts/preventative-medicines.md
new file mode 100644
index 0000000..b7664a3
--- /dev/null
+++ b/exampleSite/content/en/posts/preventative-medicines.md
@@ -0,0 +1,18 @@
+---
+title: "Why preventative medicines are afraid of the truth"
+description: "Why vaccination schedules will change your life."
+date: 2018-12-07T22:30:56+01:00
+publishDate: 2018-12-19T22:21:42+01:00
+author: "John Doe"
+images: []
+draft: false
+tags: ["medicine", "health"]
+---
+
+Why vaccination schedules will change your life. How weight loss meal plans can help you live a better life. How not knowing fitness equipment makes you a rookie. The 18 best resources for fitness equipment. 9 problems with home health care products. [17 amazing health care provider picturesi](#). How nutrition facts make you a better lover. The oddest place you will find home health care products. The 15 best health question twitter feeds to follow. Why our world would end if preventative medicines disappeared.
+
+How hollywood got travel medicines all wrong. Expose: you're losing money by not using health care solutions. 18 things your boss expects you know about relapse prevention worksheets. 5 ways vaccination schedules can make you rich. 14 things you don't want to hear about vaccination schedules. The evolution of vaccine ingredients. 19 movies with unbelievable scenes about fitness programs. 17 amazing health care solution pictures. 11 things you don't want to hear about travel vaccines. 12 movies with unbelievable scenes about travel vaccines.
+
+What the world would be like if naturopathic medicines didn't exist. 11 myths uncovered about vaccine ingredients. 9 facts about healthy eating meal plans that'll keep you up at night. Home health care products by the numbers. Why mom was right about health quotes. Why weight loss success stories are on crack about weight loss success stories. What experts are saying about travel medicines. Expose: you're losing money by not using weight loss meal plans. [What wikipedia can't tell you about vaccine ingredientsi](#). 20 facts about fitness magazines that will impress your friends.
+
+18 ways home health care products could leave you needing a lawyer. 6 ways healthy eating tips could leave you needing a lawyer. Why nutrition label makers are on crack about nutrition label makers. Why mom was right about health questions. [Why online nutrition courses will make you question everything](#). 12 facts about health informatics that will impress your friends. 16 facts about health informatics that will impress your friends. The oddest place you will find weight loss meal plans. 16 things about health informatics your kids don't want you to know. What experts are saying about fitness programs. \ No newline at end of file
diff --git a/exampleSite/content/en/sections/simple-choices.md b/exampleSite/content/en/sections/simple-choices.md
new file mode 100644
index 0000000..f0304cb
--- /dev/null
+++ b/exampleSite/content/en/sections/simple-choices.md
@@ -0,0 +1,8 @@
+---
+title : "Simple Choices"
+description: ""
+draft: false
+weight: 2
+---
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. \ No newline at end of file
diff --git a/exampleSite/content/en/sections/simple-people.md b/exampleSite/content/en/sections/simple-people.md
new file mode 100644
index 0000000..2caed07
--- /dev/null
+++ b/exampleSite/content/en/sections/simple-people.md
@@ -0,0 +1,10 @@
+---
+title : "Simple People"
+description: ""
+draft: false
+weight: 3
+---
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \ No newline at end of file
diff --git a/exampleSite/content/en/sections/simple-values.md b/exampleSite/content/en/sections/simple-values.md
new file mode 100644
index 0000000..872fcde
--- /dev/null
+++ b/exampleSite/content/en/sections/simple-values.md
@@ -0,0 +1,8 @@
+---
+title : "Simple Values"
+description: ""
+draft: false
+weight: 1
+---
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \ No newline at end of file
diff --git a/exampleSite/content/en/sections/simple.md b/exampleSite/content/en/sections/simple.md
new file mode 100644
index 0000000..7031576
--- /dev/null
+++ b/exampleSite/content/en/sections/simple.md
@@ -0,0 +1,8 @@
+---
+title : "Simple"
+description: ""
+draft: false
+weight: 4
+---
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. \ No newline at end of file
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 6e1a936..3f2a060 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -1,5 +1,5 @@
<!DOCTYPE html>
-<html lang="en">
+<html lang="{{ .Site.Language.Lang }}">
{{- partial "head.html" . -}}
<body>
@@ -8,4 +8,4 @@
{{- partial "footer.html" . -}}
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 8d0b97f..0621306 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -7,6 +7,12 @@
<link rel="icon" href="{{ $.Site.BaseURL }}{{ $.Site.Params.favicon }}" />
<meta name="description" content="{{ $.Site.Params.description }}" />
+ {{ if .IsTranslated }}
+ {{ range .AllTranslations }}
+ <link rel="alternate" hreflang="{{ .Language.Lang }}" href="{{ .Permalink }}" title="{{ .Language.LanguageName }}">
+ {{ end }}
+ {{ end }}
+
{{ hugo.Generator }}
{{ if .Site.GoogleAnalytics }}
@@ -16,6 +22,13 @@
{{ template "_internal/twitter_cards.html" . }}
{{ template "_internal/opengraph.html" . }}
+ <meta property="og:locale" content="{{ .Site.Language.Lang }}" />
+ {{ if .IsTranslated }}
+ {{ range .Translations }}
+ <meta property="og:locale:alternate" content="{{ .Language.Lang }}" />
+ {{ end }}
+ {{ end }}
+
<!-- CSS -->
{{ partial "styles.html" . }}
</head>
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 212f470..e61ea61 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -1,6 +1,6 @@
-<header class="header">
+<header class="header {{ if $.Site.Params.languageSwitcher.show }} has-LangNav{{ end }}">
<div class="header__title">
- <a href="{{ $.Site.BaseURL }}" class="header__title__link" alt="Home">
+ <a href="{{ "/" | relLangURL }}" class="header__title__link" alt="Home">
{{ if $.Site.Params.logo }}
<img src="{{ $.Site.BaseURL }}{{ $.Site.Params.logo }}" class="header__title__logo" alt="{{ $.Site.Title }}">
{{ else }}
@@ -11,4 +11,7 @@
{{ partial "menu.html" . }}
{{ partial "hamburger-menu.html" . }}
-</header> \ No newline at end of file
+ {{ if $.Site.Params.languageSwitcher.show }}
+ {{ partial "language-switcher.html" . }}
+ {{ end }}
+</header>
diff --git a/layouts/partials/language-switcher.html b/layouts/partials/language-switcher.html
new file mode 100644
index 0000000..9a703c0
--- /dev/null
+++ b/layouts/partials/language-switcher.html
@@ -0,0 +1,16 @@
+<nav class="LangNav">
+{{ $siteLanguages := site.Languages}}
+{{ $pageLang := .Page.Lang}}
+{{- range .Page.AllTranslations }}
+ {{ $translation := . }}
+ {{- range sort $siteLanguages "Weight" "asc" }}
+ {{- if eq $translation.Lang .Lang }}
+ {{ if eq $pageLang .Lang}}
+ <span class="active language">{{ .Params.languageName }}</span>
+ {{ else }}
+ <span><a href="{{ $translation.Permalink | relURL }}">{{ .Params.languageName }}</a></span>
+ {{ end }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+</nav>