Theme/site version (hash)

Could we add versioning/themes’ or sites’ hashes for cases where git is used? It could be just variables that are detected automatically prior to the rendering, or a function returning the current (commit) hash for the site/theme. The default call would return the current hash for the project, and theme would do the same for the theme.

To avoid bulky git2-rs and its dependencies, we could just check HEAD/refs/$BRANCH files in .git/ manually. Hardcoded common branch names sound like the trickiest part (if we forget about dirty states).

Maybe later we could get fancy and also check tags, but I’m not sure how many keep tagging their themes if no package infra is involved (and that’s the case for PWAs, mostly).