diff options
author | EuAndreh <eu@euandre.org> | 2023-04-08 16:20:00 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2023-04-08 21:18:22 -0300 |
commit | 6c2cbb02ac4b16ee7b4c37de50403ce604868ec0 (patch) | |
tree | ffb2fb30a741a04f89474f64a2e01df3d891cd12 /v2/src/bin/index | |
parent | v2: src/lib/: Unmark things as executable (diff) | |
download | euandre.org-6c2cbb02ac4b16ee7b4c37de50403ce604868ec0.tar.gz euandre.org-6c2cbb02ac4b16ee7b4c37de50403ce604868ec0.tar.xz |
v2: i18n of the collection name, "article" collection in root
Diffstat (limited to '')
-rwxr-xr-x | v2/src/bin/index | 8 | ||||
-rwxr-xr-x | v2/src/bin/indexentry | 4 |
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 |