diff --git a/.gitea/workflows/build_and_push.yaml b/.gitea/workflows/build_and_push.yaml index f8a975e..f4d483a 100644 --- a/.gitea/workflows/build_and_push.yaml +++ b/.gitea/workflows/build_and_push.yaml @@ -25,6 +25,11 @@ jobs: resources key: bglug-it-hugo-resources + - name: update git hash + run: | + H=$(git rev-parse --short=10 HEAD) + sed -i 's/AbbreviatedHash\.*/AbbreviatedHash: $H/' config/_default/params.yaml + - name: Build Hugo uses: lowply/build-hugo@v0.129.0 with: diff --git a/config/_default/params.yaml b/config/_default/params.yaml new file mode 100644 index 0000000..7325899 --- /dev/null +++ b/config/_default/params.yaml @@ -0,0 +1,4 @@ +--- +Source: + AbbreviatedHash: unknown + URL: https://git.libreschool.org/BgLUG/bglug.it/commits/branch/main diff --git a/layouts/partials/footer/footer.html b/layouts/partials/footer/footer.html index a78b204..b8e3fbc 100644 --- a/layouts/partials/footer/footer.html +++ b/layouts/partials/footer/footer.html @@ -49,6 +49,9 @@
  • Design: HTML5 UP
  • Theme {{- end }} + {{ with .Site.Params.Source }} +
  • Commit: {{ .AbbreviatedHash }} + {{ end }}