Introduce i18n shortcode to add translated strings to markdown pages

This commit is contained in:
Alex Shpak 2024-10-08 13:57:33 +02:00
parent 21e7727a0e
commit 1bda9fb34d
2 changed files with 3 additions and 1 deletions

View File

@ -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>

View File

@ -0,0 +1,2 @@
{{- $content := .Get 0 -}}
{{- default $content (i18n $content) -}}