1
0
mirror of https://github.com/alanorth/hugo-theme-bootstrap4-blog.git synced 2024-12-19 09:02:18 +01:00

layouts/_default/single.html: Add basic support for multi-language content

Hugo 0.17 will allow you to write content and user interface strings
in multiple languages. Requires the user to amend their config a
bit though.

See: https://github.com/spf13/hugo/blob/master/docs/content/content/multilingual.md
This commit is contained in:
Alan Orth 2016-10-03 17:57:08 +03:00
parent c2f92a95fe
commit 1a3ff61ef6
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -7,6 +7,16 @@
</header> </header>
{{ .Content }} {{ .Content }}
{{ if .IsTranslated }}
<h4>Translations</h4>
<ul>
{{ range .Translations }}
<li>
<a href="{{ .Permalink }}">{{ .Lang }}: {{ .Title }}{{ if .IsPage }}{{ end }}</a>
</li>
{{ end }}
</ul>
{{ end }}
{{ if not .Site.Params.sharingicons.hide }} {{ if not .Site.Params.sharingicons.hide }}
{{ partial "sharing-icons.html" . }} {{ partial "sharing-icons.html" . }}
{{ end }} {{ end }}