aboutsummaryrefslogtreecommitdiff
path: root/v2/src/bin/index
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xv2/src/bin/index8
-rwxr-xr-xv2/src/bin/indexentry4
2 files changed, 6 insertions, 6 deletions
diff --git a/v2/src/bin/index b/v2/src/bin/index
index 36750b3..46e0c88 100755
--- a/v2/src/bin/index
+++ b/v2/src/bin/index
@@ -4,8 +4,8 @@ set -eu
usage() {
cat <<-'EOF'
Usage:
- collection FILENAME
- collection -h
+ index FILENAME
+ index -h
EOF
}
@@ -25,7 +25,7 @@ help() {
Generate an index.html entry for english pastebins:
- $ collection src/en/pastebins/index.html
+ $ index src/en/pastebin/index.html
EOF
}
@@ -79,7 +79,7 @@ url_part="$(printf '%s' "${FILENAME#"$CONTENT_PREFIX"/}" | sed "s|\.md$|.html|")
url_absolute="$(url-for "$url_part" | absolute)"
collection="$(collection-for "$FILENAME")"
feed_url="$(url-for "${DIR#"$CONTENT_PREFIX"/}"/feed.xml)"
-by_category_url="$(url-for "${DIR#"$CONTENT_PREFIX"/}/${by_category_url_part:?}")"
+by_category_url="$(url-for "${DIR#"$CONTENT_PREFIX"/}/${by_category_url_name:?}")"
title_html="$(eval "echo \"\$index_${collection}_title\"" | htmlesc)"
index_recent_title_html="$(eval "echo \"\$index_recent_${collection}_title\"" | htmlesc)"
index_category_title_html="$(eval "echo \"\$index_category_${collection}_title\"" | htmlesc)"
diff --git a/v2/src/bin/indexentry b/v2/src/bin/indexentry
index 03bf771..f971a30 100755
--- a/v2/src/bin/indexentry
+++ b/v2/src/bin/indexentry
@@ -26,7 +26,7 @@ help() {
Generate the index entry for a TIL:
- $ indexentry src/tils/a-til.md > src/tils/a-til.indexentry
+ $ indexentry src/til/a-til.md > src/til/a-til.indexentry
EOF
}
@@ -68,6 +68,6 @@ eval "$(assert_arg "$FILENAME" 'FILENAME')"
# shellcheck source=/dev/null
-. "${FILENAME%.md}.conf"
+. "${FILENAME%.*}.conf"
envsubst < src/lib/entry.html