How to add new social networks #805
Replies: 5 comments
-
You should spend 5 minutes to read through this TOML introduction :) I think your main issue is understanding how TOML "tables" work (about halfway down that page).
And because I didn't see you mentioning the wiki, here is the link to the docs. I thought it is explaining pretty well how to extend. Copypaste the whole sample and exchange with your individual setup data. |
Beta Was this translation helpful? Give feedback.
-
Something along the lines of this, after the initial
|
Beta Was this translation helpful? Give feedback.
-
I'll give you an example in a PR, that is not working, if I change the example site like this: then I have a wikipedia logo, but none of the other defined ones, because -- to me it seems -- that setting gohugo-theme-ananke/exampleSite/config.toml Lines 77 to 82 in 7bafcf2 |
Beta Was this translation helpful? Give feedback.
-
I wonder if that is an issue in the setup of the example site only. Let me go over it. in all my other projects having a single row will extend instead of override (in any TOML table). This might be related to the order of the variables. I'll add a working override example to the sample site if I can get it working. |
Beta Was this translation helpful? Give feedback.
-
This is a bug indeed. I am trying to fix it in the next day(s). I will rework the way the networks are defined. That will need some testing and documentation rewrites. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I guess this is a question of "how to do it right".
I want to use wikipedia and facebook as a social link, wikipedia is not defined in the defaults of ananke ( https://github.com/theNewDynamic/gohugo-theme-ananke/blob/main/config/_default/params.toml ); facebook is.
Now if I try to add via my hugo.toml like this:
Now if I do that, only wikipedia works. I am guessing
[[params.ananke.social.networks]]
does not add a new element to that list, but rather overwrites it all? Is that on purpose or am I misunderstanding how the configuration merge with defaults is supposed to work?My current working configuration is just copying the facebook definition from defaults:
it works.
So my question is did I misunderstand how this is supposed to work? Or should there maybe be a params.ananke.social.networks_default one that is merged with params.ananke.social.networks so that we only need to define additional socials in our own config?
Greetings
Klaas
Beta Was this translation helpful? Give feedback.
All reactions