diff options
| author | delta <darkussdelta@gmail.com> | 2025-09-18 23:00:28 +0200 |
|---|---|---|
| committer | delta <darkussdelta@gmail.com> | 2025-09-18 23:00:28 +0200 |
| commit | 8675aa17bc308361b390c2e02ad409935f5b0e17 (patch) | |
| tree | bf41130095b4fca0cbfb2957bf045ee2aa5283dd /.zs/posthook | |
| parent | 088a18410e43a209a4864bccad5ddb89a7ee1d5d (diff) | |
add rss feed
Diffstat (limited to '.zs/posthook')
| -rwxr-xr-x | .zs/posthook | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/.zs/posthook b/.zs/posthook index bcf1d52..79bd071 100755 --- a/.zs/posthook +++ b/.zs/posthook @@ -1,19 +1,16 @@ #!/bin/sh -set -e +cat > $ZS_OUTDIR/rss.xml <<EOF +<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> +<channel> +<title>darkuss' website</title> +<link>https://darkuss.twoexem.com/</link> +<description>silly posts for silly people</description> +<generator>cobbled together bash:tm:</generator> +<language>en-gb</language> +<lastBuildDate>$(date -R)</lastBuildDate> +<atom:link href="https://zserge.com/rss.xml" rel="self" type="application/rss+xml"/> +EOF -minify_assets() { - p="$1" - t="$2" - - find "$p" -type f -name "*.$t" | while read -r file; do - name="${file#"$p"}" - name="${name#"/"}" - minify -o "${p}/${name}" "$file" - done -} - -if command -v minify > /dev/null; then - minify_assets "$ZS_OUTDIR" "css" - minify_assets "$ZS_OUTDIR" "js" -fi +./.zs/rss >> $ZS_OUTDIR/rss.xml +echo "</channel></rss>" >> $ZS_OUTDIR/rss.xml |
