11ty-website
11ty-website copied to clipboard
add fetch-depth note to `git last modified` and `git created`
Add note
- This needs an entire git history (which is often not the case in CI environments) or it will return the date of checkout. Fetch the entire history in your CI, for example in GitHub by setting
fetch-depth: 0
with GitHub's checkout action.
to git Last Modified
and git Created
on the Content Dates page
Most CIs checkout a shallow copy of the repository, in which case the git Created
and git Last Modified
dates will be wrong. This reminds people to disable shallow-cloning if using these two date types.
For example, in GitHub actions you must run
- name: Checkout
uses: actions/checkout@v4
+ with:
+ fetch-depth: "0"
for git Created
and git Last Modified
to work with Eleventy on the runners