From 4f568ab53f2df5a903dfa0131b277fb4b020125f Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Mon, 10 Jun 2024 14:36:24 +0100 Subject: Feat: localization support --- bin/compile-book | 3 +++ bin/compile-notes | 3 +++ 2 files changed, 6 insertions(+) (limited to 'bin') diff --git a/bin/compile-book b/bin/compile-book index 5c8447a..e3a8b45 100755 --- a/bin/compile-book +++ b/bin/compile-book @@ -18,6 +18,9 @@ if [ -z "$LANG" ]; then LANG="en" fi +# Update _output.yml with language information +sed -e "s|%%lang%%|$LANG|g" templates/_output.yml > _output.yml + # Set structure and templates STRUCTURE="structure/book/$LANG" TEMPLATES="templates/book/$LANG" diff --git a/bin/compile-notes b/bin/compile-notes index c56c56b..460f8f2 100755 --- a/bin/compile-notes +++ b/bin/compile-notes @@ -22,6 +22,9 @@ fi STRUCTURE="structure/notes/$LANG" TEMPLATES="templates/notes/$LANG" +# Update _output.yml with language information +sed -e "s|%%lang%%|$LANG|g" templates/_output.yml > _output.yml + # Remove any dangling output files rm -f $OUTPUT.md -- cgit v1.2.3