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

Get default page timestamp from git #3

Open
valholl opened this issue Apr 16, 2016 · 2 comments
Open

Get default page timestamp from git #3

valholl opened this issue Apr 16, 2016 · 2 comments
Labels
new Feature New staticsite Feature
Milestone

Comments

@valholl
Copy link

valholl commented Apr 16, 2016

It would be nice if staticsite could be configured to read the fallback page date from git log instead of the filesystem, because the latter is easily made inaccurate by actions such as moving the repository around, push/pull at a different time, etc.

@spanezz
Copy link
Owner

spanezz commented Apr 18, 2016

The way I currently use it is by having the date stored in the front matter of each post, and having ssite new generate it.

I like the idea of using git as a better fallback than the file mtime when a file does not have a front matter, though. How time consuming would it be to ask git for the time of the latest log entry for each file in the repo?

@spanezz
Copy link
Owner

spanezz commented Dec 15, 2019

A possible implementation idea is to add a git feature that queries information from the current commit or working tree all in one go, then adds it to metadata defaults as pages are loaded

@spanezz spanezz added the new Feature New staticsite Feature label Dec 16, 2019
@spanezz spanezz added this to the 1.5 "repo" milestone Jan 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new Feature New staticsite Feature
Projects
None yet
Development

No branches or pull requests

2 participants