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

bug: social media network array override by custom network configuration #808

Closed
davidsneighbour opened this issue Dec 14, 2024 · 2 comments · Fixed by #821
Closed

bug: social media network array override by custom network configuration #808

davidsneighbour opened this issue Dec 14, 2024 · 2 comments · Fixed by #821
Assignees

Comments

@davidsneighbour
Copy link
Collaborator

The table in [[params.ananke.social.networks]] is overridden by custom local configurations.

See discussion in #805

Possible Solution

I think we need to rework the way custom social networks are integrated from the current solution:

[[params.ananke.social.networks]] 
slug = "wikipedia" 
label = "Wikipedia" 
color = "#0645ad" 
profile = "https://en.wikipedia.org/wiki/%s" 
icon = "wikipedia-w" 

to

[params.ananke.social.networks.wikipedia]
label = "Wikipedia" 
color = "#0645ad" 
profile = "https://en.wikipedia.org/wiki/%s" 
icon = "wikipedia-w" 

where the slug is the key of the array. This makes it easy to override specific pre-defined networks and also define new items without breaking the pre-configured items.

@jerr0328
Copy link
Contributor

jerr0328 commented Feb 4, 2025

Just spent a while figuring out what I'm doing wrong, only to discover a recent commit changed away from a slice to a map, breaking the social/share links. I'm not too knowledgeable about all the internals with the caching, but I presume now it will need to iterate through the array and load the appropriate network configuration from the map, perhaps the workarounds in the layouts/partials/social/follow.html and similar files aren't as necessary anymore? I'm happy to test out changes (otherwise I should probably stick to tagged releases with my submodule 😅)

@davidsneighbour
Copy link
Collaborator Author

I would suggest to switch to GoHugo module instead of submodule integration. This way that whole version numbering works better. Sorry about the hickup, I'll try to finish up this release this week. It's mostly about writing documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants