From 1bda9fb34d4cda9d71be98aa66225da88180df5c Mon Sep 17 00:00:00 2001 From: Alex Shpak Date: Tue, 8 Oct 2024 13:57:33 +0200 Subject: [PATCH] Introduce i18n shortcode to add translated strings to markdown pages --- layouts/shortcodes/button.html | 2 +- layouts/shortcodes/i18n.html | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 layouts/shortcodes/i18n.html diff --git a/layouts/shortcodes/button.html b/layouts/shortcodes/button.html index e71c49b..efae3e0 100644 --- a/layouts/shortcodes/button.html +++ b/layouts/shortcodes/button.html @@ -8,5 +8,5 @@ {{- $ref = relref $ . -}} {{- end -}} - {{ .InnerDeindent }} + {{- .InnerDeindent -}} diff --git a/layouts/shortcodes/i18n.html b/layouts/shortcodes/i18n.html new file mode 100644 index 0000000..b65f70a --- /dev/null +++ b/layouts/shortcodes/i18n.html @@ -0,0 +1,2 @@ +{{- $content := .Get 0 -}} +{{- default $content (i18n $content) -}} \ No newline at end of file