diff --git a/build.sh b/build.sh index 4ecb0d4..374f891 100755 --- a/build.sh +++ b/build.sh @@ -1,12 +1,11 @@ #!/usr/bin/env bash set -ex -export DEPLOY_PRIME_URL=https://harald.hoyer.xyz rm -fr public -nix shell nixpkgs#zola -c zola build --base-url "$DEPLOY_PRIME_URL" +nix shell nixpkgs#zola -c zola build nix shell nixpkgs#nodejs_20 nixpkgs#zola -c npm install nix shell nixpkgs#nodejs_20 nixpkgs#zola -c npm run abridge -nix shell nixpkgs#zola -c zola build --base-url "$DEPLOY_PRIME_URL" +nix shell nixpkgs#zola -c zola build nix shell nixpkgs#brotli -c find public -type f -regextype posix-extended -regex '.*\.(htm|html|css|js|xml|xsl|txt|woff|woff2|svg|otf|eot|ttf)' -exec gzip --best -k -f {} \+ -exec brotli --best -f {} \; rsync -a --delete-after public/ /var/www/harald.hoyer.xyz/html/ chmod go-w -R /var/www/harald.hoyer.xyz/ diff --git a/templates/rss.xml b/templates/rss.xml new file mode 100644 index 0000000..b41f80e --- /dev/null +++ b/templates/rss.xml @@ -0,0 +1,40 @@ + + + + {{ config.title }} + {%- if term %} - {{ term.name }} + {%- elif section.title %} - {{ section.title }} + {%- endif -%} + + + {%- if section -%} + {{ section.permalink | escape_xml | safe }} + {%- else -%} + {{ config.base_url | escape_xml | safe }} + {%- endif -%} + + {{ config.description }} + Zola + {{ lang }} + + {{ last_updated | date(format="%a, %d %b %Y %H:%M:%S %z") }} + {%- for page in pages %} + + {{ page.title }} + {{ page.date | date(format="%a, %d %b %Y %H:%M:%S %z") }} + + {%- if page.authors -%} + {{ page.authors[0] }} + {%- elif config.author -%} + {{ config.author }} + {%- else -%} + Unknown + {%- endif -%} + + {{ page.permalink | escape_xml | safe }} + {{ page.permalink | escape_xml | safe }} + {% if page.summary %}{{ page.summary }} {{ '' | escape_xml | safe }} {% else %}{{ page.content }}{% endif %} + + {%- endfor %} + +