gohugoio / hugo

The world’s fastest framework for building websites.
https://gohugo.io
Apache License 2.0
75.73k stars 7.53k forks source link

Provide a way for Hugo modules to load a specific branch from a repo #9541

Closed rootwork closed 2 years ago

rootwork commented 2 years ago

As far as I can tell from the Hugo modules config docs and CLI docs, while there is a way to load a specific version of a module, there's no way to load a specific branch from a repo.

This would be really useful for local testing. I know that replace directives and replacements options exist but if, for instance, you're testing someone else's work you'd first have to clone their branch locally to do that. Being able to load a module by its repo's branch would be faster.

jmooring commented 2 years ago

Here's an example of getting a particular branch:

hugo mod get github.com/jmooring/hugo-content@create-article-4

In the future, please use the forum (https://discourse.gohugo.io) for questions and troubleshooting. We prefer to use GitHub for verified bugs and vetted enhancements. Thanks.

github-actions[bot] commented 2 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.