From 267843eb1a42bb061781487b3f956cdee9dd0b7e Mon Sep 17 00:00:00 2001 From: paspo Date: Tue, 6 Aug 2024 20:04:00 +0000 Subject: [PATCH] add footer commit info (#188) ![image](/attachments/9729d5ac-76ef-4aa8-9da0-227d0475f31d) il link porta https://git.libreschool.org/BgLUG/bglug.it/commits/branch/main Reviewed-on: https://git.libreschool.org/BgLUG/bglug.it/pulls/188 Reviewed-by: omar Co-authored-by: paspo Co-committed-by: paspo --- .gitea/workflows/build_and_push.yaml | 5 +++++ config/_default/params.yaml | 4 ++++ layouts/partials/footer/footer.html | 3 +++ 3 files changed, 12 insertions(+) create mode 100644 config/_default/params.yaml 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 }}