From 1716448358de81f4c9d970e7f2e57ac581717af2 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Fri, 2 Sep 2022 13:17:36 -0300 Subject: v2/: Centralize all env vars in the generated *.entry-env file --- v2/src/bin/extract | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'v2/src/bin') diff --git a/v2/src/bin/extract b/v2/src/bin/extract index 4380be7..a086264 100755 --- a/v2/src/bin/extract +++ b/v2/src/bin/extract @@ -87,6 +87,7 @@ case "$TYPE" in ' "$FILENAME" ;; env) + cat src/development/config.env awk ' /^---$/ { if (++separator > 1) { @@ -99,6 +100,27 @@ case "$TYPE" in { print } ' "$FILENAME" printf "FILENAME='%s'\n" "$FILENAME" + cat <<-'REAL_EOF' + TITLE="${TITLE:-$SITE_NAME}" + + URI_TITLE="$(printf '%s' "$TITLE" | uri)" + + URL="$( + printf '%s' "$FILENAME" | + sed \ + -e 's|^src/content/||' \ + -e 's|md$|html|' + )" + + PREAMBLE="$(cat < + Posted on +

+ EOF + )" + REAL_EOF ;; *) printf 'Bad value for TYPE: "%s".\n\n' \ -- cgit v1.2.3