Vorlage fuer eigene Ableger-Installationen: Website + CMS-Code
Bereinigt von Pilot-Spezifika (echte Inhalte, Erzbistum-Hamburg-Bezuege, Domain-Werte) - install.env und hugo.toml [params] mit generischen Platzhaltern. docs/ komplett entfernt: Konzept, Manifest, Installations- anleitungen leben jetzt auf der Projekt-Website statt redundant im Repo, README verweist dorthin. Decap-CMS-Version von einer floatenden ^3.0.0 auf ein festes 3.15.1 gepinnt.
This commit is contained in:
Executable
+26
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
# Generates hugo/data/website.json: the current commit (short hash + date)
|
||||
# of THIS website/CMS-code repo itself - shown in the footer next to the
|
||||
# Manifest version (see baseof.html) so an installation can tell at a
|
||||
# glance which code state it's actually running, independent of whether
|
||||
# it's still identical to the template or has since been developed further
|
||||
# on its own. Deliberately NOT a frozen "forked from template version X"
|
||||
# marker - once a fork's own commits land, this reflects those, not the
|
||||
# template's history.
|
||||
#
|
||||
# Unlike hugo/data/methoden.json/varianten.json (generate-dates.sh), this
|
||||
# reads the website repo's own git history directly - no separate
|
||||
# module.mounts repo involved, Hugo's enableGitInfo/.GitInfo would actually
|
||||
# work here, but a plain "git log" call keeps this consistent with the
|
||||
# same approach already used for methoden/varianten dates.
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
OUT="$ROOT/hugo/data/website.json"
|
||||
mkdir -p "$(dirname "$OUT")"
|
||||
|
||||
commit="$(git -C "$ROOT" rev-parse --short HEAD)"
|
||||
datum="$(git -C "$ROOT" log -1 --format=%aI)"
|
||||
|
||||
jq -n --arg commit "$commit" --arg datum "$datum" '{commit: $commit, datum: $datum}' > "$OUT"
|
||||
echo "website.json aktualisiert: $commit ($datum)"
|
||||
Reference in New Issue
Block a user