mirror of
https://github.com/alex-shpak/hugo-book.git
synced 2025-05-08 06:48:11 +00:00
Introduce i18n shortcode to add translated strings to markdown pages
This commit is contained in:
parent
21e7727a0e
commit
1bda9fb34d
@ -8,5 +8,5 @@
|
|||||||
{{- $ref = relref $ . -}}
|
{{- $ref = relref $ . -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
<a {{ with $ref }} href="{{.}}" {{ end }} {{ with $target }} target="{{.}}" rel="noopener" {{ end }} class="book-btn{{ with .Get "class" }} {{ . }}{{ end }}">
|
<a {{ with $ref }} href="{{.}}" {{ end }} {{ with $target }} target="{{.}}" rel="noopener" {{ end }} class="book-btn{{ with .Get "class" }} {{ . }}{{ end }}">
|
||||||
{{ .InnerDeindent }}
|
{{- .InnerDeindent -}}
|
||||||
</a>
|
</a>
|
||||||
|
2
layouts/shortcodes/i18n.html
Normal file
2
layouts/shortcodes/i18n.html
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
{{- $content := .Get 0 -}}
|
||||||
|
{{- default $content (i18n $content) -}}
|
Loading…
Reference in New Issue
Block a user