commit faf36abd5ff0a339db75931248df57fa245012f1
parent 822f3ba27cc4f3cb5e06e83301fc58f0cf52a93d
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date: Wed, 4 Mar 2026 18:49:49 +0100
feat: overhaul hashing markers; add domains of origin page
Diffstat:
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/generate.sh b/generate.sh
@@ -131,9 +131,12 @@ sed -E -e 's/\*/\\*/g' -i ./output/zeitung.md
# generate internal linking by creating SHA1 hashes ----------------------------
perl -MDigest::SHA=sha1_hex \
- -pe 's/HASH:(http[^(\)|\})]+)/sha1_hex$1/ge' \
+ -pe 's/HASH:(.+?):HASH/sha1_hex$1/ge' \
-i ./output/zeitung.md
+# generate domains from URLs ---------------------------------------------------
+sed -E -e 's/DOMAIN:http(s)*:\/\/([^\/]+).*?:DOMAIN/\2/g' -i ./output/zeitung.md
+
# remove double entries --------------------------------------------------------
grep "{#" ./output/zeitung.md | \
sed -E -e 's/(\-|\;|\\|\/|\ |\!|\"|\#|\$|\&|\(|\)|\||\*|\,|\<|\>|\[|\]|\^|\`|\{|\.)/\\\1/g' | \
diff --git a/templates/index.tt b/templates/index.tt
@@ -23,9 +23,9 @@ header-includes:
[% FOREACH entry IN feed.entries %]
<!--START:[% entry.issued | html %]-->
-## [% entry.title | html %] {#overview-HASH:[% entry.link | url | html %]}
+## [% entry.title | html %] {#overview-HASH:[% entry.link | url | html %]:HASH}
-[% entry.issued | html %][% IF entry.author %] by [% entry.author | html %][% END %]
+[% entry.issued | html %][% IF entry.author %] by [% entry.author | html %][% END %] via DOMAIN:[% entry.link | url | html %]:DOMAIN
[% IF entry.summary.body %]
[% entry.summary.body %]
@@ -33,7 +33,7 @@ header-includes:
[% entry.content.body %]
[% END %]
-_[Read article](#HASH:[% entry.link | url | html %])_
+_[Read article](#HASH:[% entry.link | url | html %]:HASH)_
<!--STOP:[% entry.issued | html %]-->
[% END %]
@@ -47,11 +47,11 @@ _[Read article](#HASH:[% entry.link | url | html %])_
[% FOREACH entry IN feed.entries %]
<!--START:[% entry.issued | html %]-->
-## [% entry.title | html %] {#HASH:[% entry.link | url | html %]}
+## [% entry.title | html %] {#HASH:[% entry.link | url | html %]:HASH}
- [% entry.issued | html %][% IF entry.author %] by [% entry.author | html %][% END %]
-- _[Read article online]([% entry.link | url %])_
-- _[Back to the overview](#overview-HASH:[% entry.link | url | html %])_
+- _[Read article on DOMAIN:[% entry.link | url | html %]:DOMAIN]([% entry.link | url | html %])_
+- _[Back to the overview](#overview-HASH:[% entry.link | url | html %]:HASH)_
[% IF entry.content.body %]
[% entry.content.body %]