aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh39
1 files changed, 39 insertions, 0 deletions
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
+ <h1>Links</h1>
+ <p>Dynamic Link generation is currently not possible.</p>
+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
+ <html>
+ <head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <link rel="stylesheet" href="/style.css">
+ <link rel="icon" type="image/x-icon" href="/icon.png">
+ <title>$filename</title>
+ <meta http-equiv="refresh" content="0; url=$content">
+ </head>
+ <body>
+ <p><a href="$content">redirect...</a></p>
+ </body>
+ </html>
+EOF
+
+done
+cd ..
+
echo "[build] copying static files..."
cp ./con/style.css ./web/style.css
cp ./con/icon.png ./web/icon.png