mirror of
https://github.com/alanorth/hugo-theme-bootstrap4-blog.git
synced 2024-12-19 00:52:19 +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:
parent
c2f92a95fe
commit
1a3ff61ef6
@ -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 }}
|
||||||
|
Loading…
Reference in New Issue
Block a user