Skip to content

Commit

Permalink
Introduce i18n shortcode to add translated strings to markdown pages
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-shpak committed Oct 8, 2024
1 parent 21e7727 commit 1bda9fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion layouts/shortcodes/button.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 2 additions & 0 deletions layouts/shortcodes/i18n.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{{- $content := .Get 0 -}}
{{- default $content (i18n $content) -}}

0 comments on commit 1bda9fb

Please sign in to comment.