From b69ae89bf07d63c9e13e36f1d8b0fcf293a16d7b Mon Sep 17 00:00:00 2001 From: Jerry Jacobs Date: Sat, 24 May 2025 17:40:51 +0200 Subject: [PATCH] Add donate page, fixup theme compat with hugo 0.145.0 and github action workflow --- .github/workflows/hugo.yml | 2 +- src/content/donate.md | 12 ++++++++++++ .../layouts/partials/func/style/GetMainCSS.html | 6 +++--- src/themes/ananke/layouts/partials/social-share.html | 2 +- 4 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 src/content/donate.md diff --git a/.github/workflows/hugo.yml b/.github/workflows/hugo.yml index 9a27dd9..3c47911 100644 --- a/.github/workflows/hugo.yml +++ b/.github/workflows/hugo.yml @@ -30,7 +30,7 @@ jobs: build: runs-on: ubuntu-latest env: - HUGO_VERSION: 0.135.0 + HUGO_VERSION: 0.145.0 steps: - name: Install Hugo CLI run: | diff --git a/src/content/donate.md b/src/content/donate.md new file mode 100644 index 0000000..efc1141 --- /dev/null +++ b/src/content/donate.md @@ -0,0 +1,12 @@ +--- +title: Donate +description: PyroTechny.EU +featured_image: /images/site/about-header.jpg +type: page +menus: main +--- +To keep pyrotechnic knowledge easily accessible for future generations we would value any amount of donation via [Donationalerts](https://www.donationalerts.com/r/pyrotechny_eu) or [PayPal](https://www.paypal.com/donate/?hosted_button_id=A2X97VEQMB9YE). Please use the donation comment field if you want to be mentioned on this page, but you can always donate anonymously. + +| date | (nick)name | amount | +| ---- | ---------- | ------ | +| - | - | - | diff --git a/src/themes/ananke/layouts/partials/func/style/GetMainCSS.html b/src/themes/ananke/layouts/partials/func/style/GetMainCSS.html index 16ecd29..f3196c5 100644 --- a/src/themes/ananke/layouts/partials/func/style/GetMainCSS.html +++ b/src/themes/ananke/layouts/partials/func/style/GetMainCSS.html @@ -49,7 +49,7 @@ css asset directory we (unless condition below) add to aforementioned slice */}} {{ if eq .MediaType.SubType "x-scss" "x-sass" "scss" "sass" }} {{ if hugo.IsExtended }} {{/* as we cannot concatenate styles of different types, we sass/scss to be transformed to css beforehand */}} - {{ $assets_to_concat = $assets_to_concat | append (. | resources.ToCSS) }} + {{ $assets_to_concat = $assets_to_concat | append (. | css.Sass ) }} {{ else }} {{ partial "func/warn" (printf "Processing of stylesheet %s of type %s has been skipped. You need Hugo Extended to process such files." .Name .MediaType.SubType) }} {{ end }} @@ -66,7 +66,7 @@ css asset directory we (unless condition below) add to aforementioned slice */}} {{/* We then use toCSS to add sourceMap and minify */}} {{ $options := dict "enableSourceMap" true "precision" 6 }} - {{ $style = $style | resources.ToCSS $options | minify }} + {{ $style = $style | css.Sass $options | minify }} {{/* We fingerprint in production for cache busting purposes */}} {{ if eq (getenv "HUGO_ENV") "production" }} {{ $style = $style | fingerprint }} @@ -75,4 +75,4 @@ css asset directory we (unless condition below) add to aforementioned slice */}} {{ $main_style = $style }} {{ end }} -{{ return $main_style }} \ No newline at end of file +{{ return $main_style }} diff --git a/src/themes/ananke/layouts/partials/social-share.html b/src/themes/ananke/layouts/partials/social-share.html index a0cef16..0f92ecb 100644 --- a/src/themes/ananke/layouts/partials/social-share.html +++ b/src/themes/ananke/layouts/partials/social-share.html @@ -3,7 +3,7 @@ {{ $facebook_href := printf "https://www.facebook.com/sharer.php?u=%s" $url }} {{ $twitter_href := printf "https://twitter.com/share?url=%s&text=%s" $url $title }} -{{ with site.Social.twitter }} +{{ with .Site.Params.Social.twitter }} {{ $twitter_href = printf "%s&via=%s" $twitter_href . }} {{ end }} {{ $linkedin_href := printf "https://www.linkedin.com/shareArticle?mini=true&url=%s&title=%s" $url $title }}