Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tool: Datum/Commit-SHA letzter Änderung in den Seiten aufführen #189

Open
cagix opened this issue Oct 27, 2023 · 0 comments
Open

Tool: Datum/Commit-SHA letzter Änderung in den Seiten aufführen #189

cagix opened this issue Oct 27, 2023 · 0 comments

Comments

@cagix
Copy link
Owner

cagix commented Oct 27, 2023

Hugo kann von Haus aus eigentlich das Datum und den Commit der letzten Änderung herausfinden und auf die Seiten schreiben. Da im aktuellen Tooling aber Dateien bei der Vorverarbeitung per Make verschoben werden, klappt das nicht mehr.

Idee: Das Makefile so erweitern, dass zusätzlich zu jedem File der letzte Commit in einer Variable gespeichert wird. Das dann als Metadata bei der Vorverarbeitung setzen (lastmod o.ä.) und in den Hugo-Templates eine entsprechende Fußzeile einbauen/aktivieren.

Befehl: git log --follow -n 1 --pretty=format:"last modified: %h (by %an on %ah)" -- README.md => "last modified: 7830b8a (by Carsten Gips on Tue Sep 5 09:55)"

@cagix cagix changed the title Tool: letzte Änderung in den Seiten aufführen Tool: Datum/Commit-SHA letzter Änderung in den Seiten aufführen Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant