Setting HUGO_MODULE_REPLACEMENTS uses go.mod version without error

You need to remove the “replace”. Try:

env HUGO_MODULE_REPLACEMENTS='replace github.com/willfaught/paige -> paige' HUGO_THEMESDIR=../.. hugo server

On a related note, the above setting was added before Go got workspace support.

See https://github.com/gohugoio/hugoDocs/blob/master/hugo.work

As an example, when I do theme changes on the Hugo theme, I do this from the hugoDocs repo:

 HUGO_MODULE_WORKSPACE=hugo.work hugo server --ignoreVendorPaths "**"
1 Like