aboutsummaryrefslogtreecommitdiff
path: root/v2/src/bin/feed
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/feed
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 '')
-rwxr-xr-xv2/src/bin/feed9
1 files changed, 5 insertions, 4 deletions
diff --git a/v2/src/bin/feed b/v2/src/bin/feed
index 52c6199..f55ba89 100755
--- a/v2/src/bin/feed
+++ b/v2/src/bin/feed
@@ -27,7 +27,7 @@ help() {
Generate a feed for TILs:
- $ feed src/en/tils/feed.xml
+ $ feed src/en/til/feed.xml
EOF
}
@@ -76,8 +76,9 @@ eval "$(assert_arg "$FILENAME" 'FILENAME')"
now="$(date -uIs)"
url_absolute="$(url-for "${FILENAME#"$CONTENT_PREFIX"/}" | absolute)"
site_name_html="$(htmlesc "${site_name:?}")"
-collection="$(collection-for "$FILENAME")"
-collection_url_absolute="$(url-for "${lang:?}/$collection/" | absolute)"
+collection="$(sh src/bin/collection-for "$FILENAME")"
+coll_path="$(coll2path "${lang:?}" "$collection")"
+collection_url_absolute="$(url-for "${lang:?}/$coll_path" | absolute)"
feed_title_html="$(eval "echo \"\$feed_${collection}_title\"" | htmlesc)"
export now url_absolute site_name_html collection_url_absolute feed_title_html
@@ -96,7 +97,7 @@ mkdir -p "$DIR"
printf '' > "$DIR"/index.extrafeeds
while read -r category; do
url_absolute="$(url-for "${DIR#"$CONTENT_PREFIX"/}/feed.$category.xml" | absolute)"
- collection_url_absolute="$(url-for "${DIR#"$CONTENT_PREFIX"/}/${by_category_url_part:?}#$category" | absolute)"
+ collection_url_absolute="$(url-for "${DIR#"$CONTENT_PREFIX"/}/${by_category_url_name:?}#$category" | absolute)"
feed_title_html="$(eval "echo \"\$index_category_${collection}_title\"" | htmlesc)"
export url_absolute collection_url_absolute feed_title_html