aboutsummaryrefslogtreecommitdiff
path: root/v2/src/bin/html
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2023-04-08 16:20:00 -0300
committerEuAndreh <eu@euandre.org>2023-04-08 21:18:22 -0300
commit6c2cbb02ac4b16ee7b4c37de50403ce604868ec0 (patch)
treeffb2fb30a741a04f89474f64a2e01df3d891cd12 /v2/src/bin/html
parentv2: src/lib/: Unmark things as executable (diff)
downloadeuandre.org-6c2cbb02ac4b16ee7b4c37de50403ce604868ec0.tar.gz
euandre.org-6c2cbb02ac4b16ee7b4c37de50403ce604868ec0.tar.xz
v2: i18n of the collection name, "article" collection in root
Diffstat (limited to 'v2/src/bin/html')
-rwxr-xr-xv2/src/bin/html10
1 files changed, 5 insertions, 5 deletions
diff --git a/v2/src/bin/html b/v2/src/bin/html
index f995753..578c539 100755
--- a/v2/src/bin/html
+++ b/v2/src/bin/html
@@ -68,7 +68,7 @@ eval "$(assert_arg "$FILENAME" 'FILENAME')"
# shellcheck source=/dev/null
-. "${FILENAME%.md}.conf"
+. "${FILENAME%.*}.conf"
#
# Utility functions
@@ -99,7 +99,7 @@ markdown_to_html() {
}
extract_plaintext_snippets() (
- SNIPPETS="${FILENAME%.md}.snippets"
+ SNIPPETS="${FILENAME%.*}.snippets"
printf '' > "$SNIPPETS"
F="$(mkstemp)"
cat > "$F"
@@ -117,7 +117,7 @@ extract_plaintext_snippets() (
if printf '%s' "$line" | grep -q "^$INDENT<pre><code"; then
IN_BLOCK=1
- OUT="${FILENAME%.md}.html.$BLOCK_NUMBER.txt"
+ OUT="${FILENAME%.*}.html.$BLOCK_NUMBER.txt"
BLOCK_NUMBER=$((BLOCK_NUMBER + 1))
printf '%s\n' "$line" |
sed "s|^\($INDENT<pre><code.*>\)\(.*\)$|\2|" |
@@ -205,7 +205,7 @@ warn_duplicate_ids() {
}
emit_body() {
- < "${FILENAME%.md}.content" \
+ < "${FILENAME%.*}.content" \
markdown_to_html |
extract_plaintext_snippets |
add_line_numbers |
@@ -214,5 +214,5 @@ emit_body() {
}
envsubst < src/lib/preamble.html
-emit_body | tee "${FILENAME%.md}.htmlbody"
+emit_body | tee "${FILENAME%.*}.htmlbody"
envsubst < src/lib/postamble.html