mirror of
https://github.com/alex-shpak/hugo-book.git
synced 2024-11-21 19:09:29 +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 $ . -}}
|
||||
{{- end -}}
|
||||
<a {{ with $ref }} href="{{.}}" {{ end }} {{ with $target }} target="{{.}}" rel="noopener" {{ end }} class="book-btn{{ with .Get "class" }} {{ . }}{{ end }}">
|
||||
{{ .InnerDeindent }}
|
||||
{{- .InnerDeindent -}}
|
||||
</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