mirror of
https://github.com/alanorth/hugo-theme-bootstrap4-blog.git
synced 2024-12-24 19:24:29 +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>
|
||||
{{ .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 }}
|
||||
{{ partial "sharing-icons.html" . }}
|
||||
{{ end }}
|
||||
|
Loading…
Reference in New Issue
Block a user