Add Page.GitInfo support for content from Git modules

Use blobless git clone (--filter=blob:none --no-checkout) to fetch
commit history for content from Git modules, then map it using the
existing gitmap library.  Cloned repos are cached in the modulegitinfo file cache.

Closes #14431
Fixes #5533
This commit is contained in:
Bjørn Erik Pedersen
2026-02-23 17:43:17 +01:00
committed by GitHub
parent 2d691c7e47
commit dfece5b674
16 changed files with 547 additions and 107 deletions
+1 -2
View File
@@ -18,8 +18,7 @@ hugo mod clean
! stderr .
stdout 'hugo: removed 1 dirs in module cache for \"github.com/bep/empty-hugo-module\"'
hugo mod clean --all
# Currently this is 299 on MacOS and 301 on Linux.
stdout 'Deleted (2|3)\d{2} files from module cache\.'
stdout 'Deleted (2|3)\d{2} directories from module cache\.'
cd submod
hugo mod init testsubmod
cmpenv go.mod $WORK/golden/go.mod.testsubmod