docs
docs copied to clipboard
Replace the `git-restore-mtime` based "last updated at" system with something that scales better
To determine the "last updated at time" for each page, we currently...
- Have the whole repo history downloaded (IE not a shallow clone)
- Run
git-restore-mtimeto fix themtimeattributes on all the files - Pull in the file's
mtimethrough the gatsby graph
This works fine, but doesn't scale super well. Because we need a full clone of the repo to determine the time the file was last modified at, the build process can't use a shallow clone.
We could replace this system with a git hook that writes the modified time into the mdx file's frontmatter at commit time. This would allow the build process to take a shallow clone, since this mtime information would be encoded into each file. Then the modified time can be pulled from frontmatter instead of the file attributes.