-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
Description
See gohugoio/hugo#13966.
For example:
[[module.imports]]
path = 'github.com/bep/hugo-mod-misc/dummy-content'
version = 'v0.2.0'
[[module.imports]]
path = 'github.com/bep/hugo-mod-misc/dummy-content'
version = 'v0.1.0'
[[module.imports.mounts]]
source = 'content'
target = 'content/v1'
See:
- modules: Improve error checking and messaging hugo#14010 (comment)
- modules: Add support for direct version module imports in hugo.toml hugo#13966 (notes)
- https://gohugo.io/configuration/module/#version
- https://discourse.gohugo.io/t/mounting-different-branches-tags-from-the-same-repository/55849/8
Also, provide example where version isn't v0.x.x
or v1.x.x
, e.g.
[[module.imports]]
path = "github.com/alex-shpak/hugo-book/v12"
version = 'v12.0.0'
In the above note that the path suffix must exist for v2 and later, and it must match the major version of version
.
Maybe document this handy command too:
$ go list -m -versions github.com/CaiJimmy/hugo-theme-stack/v3
github.com/CaiJimmy/hugo-theme-stack/v3 v3.0.0 v3.1.0 v3.2.0 v3.3.0 v3.4.0 v3.5.0 v3.6.0 v3.7.0 v3.8.0 v3.9.0-alpha v3.9.0 v3.9.1 v3.9.2 v3.10.0 v3.11.0 v3.12.0 v3.13.0 v3.14.0 v3.15.0 v3.16.0 v3.17.0 v3.18.0 v3.19.0 v3.20.0 v3.21.0 v3.22.0 v3.23.0 v3.24.0 v3.24.1 v3.24.2 v3.25.0 v3.26.0 v3.27.0 v3.28.0 v3.29.0 v3.30.0 v3.31.0