Skip to content

Allow v1,v2 etc. style version names while still supporting full semver in queries#14416

Merged
bep merged 1 commit intogohugoio:masterfrom
bep:fix/sitesmatrixtheme-14414
Jan 23, 2026
Merged

Allow v1,v2 etc. style version names while still supporting full semver in queries#14416
bep merged 1 commit intogohugoio:masterfrom
bep:fix/sitesmatrixtheme-14414

Conversation

@bep
Copy link
Member

@bep bep commented Jan 22, 2026

This enables a potentially useful workflow partitioning docs into major short versions (v1, v2 etc.). See https://github.com/bep/hugo-testing-git-versions for a runnable version.

My final setup doesn't need this PR (but I still thinks a good idea):

[versions]
    [versions.v1]
    [versions.v2]
    [versions.v3]
    [versions.dev]

[module]
    [[module.mounts]]
        source = 'content'
        target = 'content'
        [module.mounts.sites.matrix]
            versions = 'dev'
    [[module.imports]]
        ignoreConfig = true
        path         = 'github.com/bep/hugo-testing-git-versions'
        version      = '<v2.0.0'
        [[module.imports.mounts]]
            source = 'content'
            target = 'content'
            [module.imports.mounts.sites.matrix]
                versions = 'v1'
    [[module.imports]]
        ignoreConfig = true
        path         = 'github.com/bep/hugo-testing-git-versions'
        version      = '<v3.0.0'
        [[module.imports.mounts]]
            source = 'content'
            target = 'content'
            [module.imports.mounts.sites.matrix]
                versions = 'v2'
    [[module.imports]]
        ignoreConfig = true
        path         = 'github.com/bep/hugo-testing-git-versions'
        version      = '<v4.0.0'
        [[module.imports.mounts]]
            source = 'content'
            target = 'content'
            [module.imports.mounts.sites.matrix]
                versions = 'v3'

Fixes #14414

@bep bep force-pushed the fix/sitesmatrixtheme-14414 branch from b2b3bb7 to 696458b Compare January 23, 2026 15:09
@bep bep marked this pull request as ready for review January 23, 2026 15:09
@bep bep merged commit ac2c3fb into gohugoio:master Jan 23, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Check module mount vs import mount issue

1 participant