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

.Site.Social contains unexpected extra key '_merge' as of version 0.112.0 #11083

Closed
henryleach opened this issue Jun 10, 2023 · 3 comments
Closed
Assignees

Comments

@henryleach
Copy link

What version of Hugo are you using (hugo version)?

hugo v0.113.0+extended darwin/amd64 BuildDate=unknown

Does this issue reproduce with the latest release?

Yes

To Reproduce:

In config.toml

[social]
fediverse = "https://fosstodon.org"
github = "https://www.github.com"
twitter = "https://www.twitter.com"
stackoverflow = "https://www.stackoverflow.com"
facebook = "https://www.facebook.com"
linkedin = "https://www.linkedin.com"

In the partial I have:

<p>{{ .Site.Social }}</p>
<p>{{ range $key, $val := .Site.Social }}
	{{ print $key ": " $val }}<br>
    {{ end }}</p>

On Version 0.112.0+ (inc 0.113) this renders to:

map[_merge: facebook:https://www.facebook.com fediverse:https://fosstodon.org github:https://www.github.com linkedin:https://www.linkedin.com stackoverflow:https://www.stackoverflow.com twitter:https://www.twitter.com]

_merge: 
facebook: https://www.facebook.com
fediverse: https://fosstodon.org
github: https://www.github.com
linkedin: https://www.linkedin.com
stackoverflow: https://www.stackoverflow.com
twitter: https://www.twitter.com

On version 0.111.3 this used to render to:

map[facebook:https://www.facebook.com fediverse:https://fosstodon.org github:https://www.github.com linkedin:https://www.linkedin.com stackoverflow:https://www.stackoverflow.com twitter:https://www.twitter.com]

facebook: https://www.facebook.com
fediverse: https://fosstodon.org
github: https://www.github.com
linkedin: https://www.linkedin.com
stackoverflow: https://www.stackoverflow.com
twitter: https://www.twitter.com

Without the random, emtpy, additional "_merge" key. Is this key now expected in such a map? I searched for documentation regarding .Site.Social, but could only find this old issue 1380 from 2015

@jmooring
Copy link
Member

Is this key now expected in such a map?

No, it is not.

@bep bep removed the NeedsTriage label Jun 12, 2023
@bep bep self-assigned this Jun 12, 2023
@bep bep closed this as completed in b7dc93c Jun 12, 2023
@henryleach
Copy link
Author

Excellent, thank you for the quick fix.

@github-actions
Copy link

github-actions bot commented Jul 8, 2023

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 Jul 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants