From 164a2ebf657ea030268d523a4acb000897fca817 Mon Sep 17 00:00:00 2001 From: hitlerrip Date: Mon, 4 Aug 2025 16:45:37 +0200 Subject: primitive links added primitive link generation this needs to re-run the script to create links, there is no such thing as fetching links from a database. i am unsure if i want this added... --- build.sh | 39 +++++++++++++++++++++++++++++++++++++++ lnk/test.meta | 1 + 2 files changed, 40 insertions(+) create mode 100644 lnk/test.meta diff --git a/build.sh b/build.sh index 1f5c57f..39840de 100755 --- a/build.sh +++ b/build.sh @@ -21,6 +21,7 @@ mkdir -p ./src/articles/ mkdir -p ./tmp/articles/ mkdir -p ./web/articles/ mkdir -p ./web/licenses/ +mkdir -p ./web/links/ mkdir -p ./dir/ touch ./con/header.html @@ -243,6 +244,44 @@ cat ./con/rss-header.xml \ ./con/rss-footer.xml \ > ./web/articles/feed.xml +echo "[build] creating links..." + +tee ./tmp/temp-content-links-site.html > /dev/null << EOF +

Links

+

Dynamic Link generation is currently not possible.

+EOF +cat ./con/header.html \ + ./tmp/temp-content-links-site.html \ + ./con/footer.html \ + > ./web/links/index.html + +cd ./lnk/ +for i in *.meta; do + + echo "[build] linking to: $i" + filename=$( echo "$i" | rev | cut -c6- | rev ) + content=$( cat "$i" ) + + mkdir -p ../web/links/"$filename"/ + tee ../web/links/"$filename"/index.html > /dev/null << EOF + + + + + + + $filename + + + +

redirect...

+ + +EOF + +done +cd .. + echo "[build] copying static files..." cp ./con/style.css ./web/style.css cp ./con/icon.png ./web/icon.png diff --git a/lnk/test.meta b/lnk/test.meta new file mode 100644 index 0000000..fa910e5 --- /dev/null +++ b/lnk/test.meta @@ -0,0 +1 @@ +https://duckduckgo.com -- cgit v1.2.3