examples: Add example for translation files

This commit is contained in:
Richard Metzler authored and digitalcraftsman committed 2016-07-29 20:21:52 +02:00
1 parent 04889a5ee6
commit 5b40eeede1
4 files changed
+7 -11

No files matched your search

@@ -0,0 +1,2 @@
head_title: Multilingual
title: My multilingual site
@@ -0,0 +1,2 @@
head_title: Mitmekeelne
title: Minu mitmekeelne leht
@@ -3,13 +3,9 @@
<head>
<meta charset="utf-8">
{{ if .Title }}
{{ if (eq .Params.lang "et") }}
<title>Mitmekeelne - {{ .Title }}</title>
{{ else }}
<title>Multilingual - {{ .Title }}</title>
{{ end }}
<title>{{ (index .Site.Data.translations .Params.lang).head_title }} - {{ .Title }}</title>
{{ end }}
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/main.css">
</head>
<body>
<body>
@@ -4,11 +4,7 @@
<a href="/kodu">Eesti</a>
</nav>
{{ if (eq .Params.lang "et") }}
<h1 id="title">Minu mitmekeelne leht</h1>
{{ else }}
<h1 id="title">My multilingual site</h1>
{{ end }}
<h1 id="title">{{ (index .Site.Data.translations .Params.lang).title }}</h1>
<nav id="main-menu">
{{ range (index .Site.Taxonomies.menu .Params.lang).Pages }}