Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uglyurls not support map[string]bool #12926

Closed
akkuman opened this issue Oct 12, 2024 · 1 comment · Fixed by #12927
Closed

uglyurls not support map[string]bool #12926

akkuman opened this issue Oct 12, 2024 · 1 comment · Fixed by #12927

Comments

@akkuman
Copy link
Contributor

akkuman commented Oct 12, 2024

uglyurls support is configured as map[string]bool according to the following link

  • isUglyURL := func(section string) bool {
    switch v := c.UglyURLs.(type) {
    case bool:
    return v
    case map[string]bool:
    return v[section]
    default:
    return false
    }
    }
  • "uglyurls": {
    key: "uglyurls",
    decode: func(d decodeWeight, p decodeConfig) error {
    v := p.p.Get(d.key)
    switch vv := v.(type) {
    case bool:
    p.c.UglyURLs = vv
    case string:
    p.c.UglyURLs = vv == "true"
    default:
    p.c.UglyURLs = cast.ToStringMapBool(v)
    }
    return nil
    },
    internalOrDeprecated: true,
    },

but not work

because v is maps.Params[_merge:none post:true] in p.c.UglyURLs = cast.ToStringMapBool(v), none should be clean

akkuman added a commit to akkuman/hugo that referenced this issue Oct 12, 2024
akkuman added a commit to akkuman/hugo that referenced this issue Oct 12, 2024
bep pushed a commit to akkuman/hugo that referenced this issue Oct 14, 2024
bep added a commit to akkuman/hugo that referenced this issue Oct 14, 2024
bep pushed a commit that referenced this issue Oct 14, 2024
bep added a commit that referenced this issue Oct 14, 2024
Copy link

github-actions bot commented Nov 5, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant