-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Description
GitInfo provides metadata about content files, but from my observations and reading of the code, it actually searches the working directory for a git repo, not the content directory.
As a result, if content and theme/configuration are kept in separate repos (including when content is a submodule), Hugo fails to find any git metadata for the content files because it's querying the wrong repo.
Because GitInfo is for information about content, not theme/build configuration etc., Hugo should search for a git repo from the content directory, not the working directory, which is generally where the configuration and themes are found, and may or may not be in the same repo.
This should make GitInfo behave correctly for anyone who keeps their content in a separate repo, while continuing to work as before for mono-repos.