From 573b17ca57d1bc4b20196615ad4cacbef1fafd9c Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Fri, 9 Oct 2026 07:31:50 +0200 Subject: Include content in feed --- build.sh | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 1cfcd1c..2a48686 100755 --- a/build.sh +++ b/build.sh @@ -16,8 +16,6 @@ recursivebuild() { done } -# This function is currently useless, but we keep it in case we need to -# preprocess some m4 files. mdpreprocess() { file="$1" if [ "$(echo "$file" | sed 's/.*\.//')" = "m4" ]; then @@ -75,6 +73,17 @@ htmltitle() { grep '$//' } +feedify() { + printf '\nNote: internal links to ' + printf 'sebastiano.tronto.net ' + printf 'may be broken in feed view. Read this page online or fix them ' + printf 'manually if you want to follow them.

\n\n' + sed -n '/
/,/<\/main>/p; s/]]>/]]]]>\n\n' +} + makeblogindexandfeed() { mkdir -p http/blog bf=http/blog/index.html @@ -95,6 +104,9 @@ makeblogindexandfeed() { d="$(echo "$i" | grep -oE '^[0-9]{4}-[0-9]{2}-[0-9]{2}')" t="$(markdowntitle $f)" link="https://sebastiano.tronto.net/blog/$i" + #cont="$(sed -n '/
/,/<\/main>/p' http/blog/$i/index.html |\ + #head -n -2 | tail -n +3)" + cont="$(feedify http/blog/$i/index.html)" thisyear="$(echo "$d" | sed 's/-.*//')" if [ "$thisyear" != "$lastyear" ]; then @@ -113,6 +125,7 @@ makeblogindexandfeed() { echo "$link"; echo "$link"; echo "$t"; + echo "$cont"; echo "$dd $mon $thisyear 00:00:00 GMT"; echo ""; echo ""; } >> $ff @@ -166,5 +179,5 @@ month() { } sed "s/LASTUPDATE/$(date +'%Y-%m-%d')/" "$bottomtmp" -makeblogindexandfeed recursivebuild src +makeblogindexandfeed -- cgit v1.3