diff --git a/README.md b/README.md index 1c88307..6ec5433 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,10 @@ theme = "BlogAMore" author = "Beispiel Autor" description = "Eine Beschreibung des Autors, als kurze Zusammenfassung" + # Dateiname der den aktuellen Commit-Hash entält, sowie die Basis-url des Repo, damit im Footer der aktuelle Hash angezeigt wird, die Datei muss dann am besten über das Published-Script erzeugt werden + gitHashFile = "commit_id.txt" + gitRepoUrl = "http://example.com" + # Zusätzliche CSS und JS-Dateien custom_css = [] custom_js = [] diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index fd374df..690292e 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -6,5 +6,19 @@ {{ end }} +

+ {{ if (and (isset .Site.Params "githashfile") (isset .Site.Params "gitrepourl")) }} + {{ if (fileExists .Site.Params.gitHashFile) }} + {{ $commit_id := trim (readFile .Site.Params.gitHashFile) "\n" }} + Git commit: + {{- substr $commit_id 0 7 -}} + + {{ end }} + {{ end }} + Updated on {{ now.Format "January 2, 2006" }} +

+

© 2009-{{ now.Format "2006"}} MarcoDN