reuixiy / hugo-theme-meme

😝 You can’t spell awesome without MemE!
https://io-oi.me/hugo-theme-meme
MIT License
1.01k stars 279 forks source link

Allow changing the order of post share items #446

Closed palant closed 10 months ago

palant commented 11 months ago

I plan to implement a change allowing the order of share items to be determined freely. For example, I don’t want Facebook to be at the start of the list.

Question is: how will this look in the config? I can see two options:

  1. A new option shareItemsOrder is added. It doesn’t need to be present in the config, the default value is ["twitter", "facebook", "linkedin", "telegram", "weibo", "douban", "qq", "qzone", "qrcode"]. The share icons are only displayed if they are also enabled via the corresponding option like shareOnFacebook.
  2. A new option postShareItems replaces existing options like shareOnFacebook. Its default value is an empty list (no share items displayed), and configuration can set it to something like ["facebook", "linkedin", "qrcode"] – any items listed will be displayed, no further options to enable.

Personally, I prefer the second option that will get rid of redundant options. However, it isn’t backwards compatible and everyone using this feature will have to adjust the configuration. What do you think @reuixiy?

reuixiy commented 11 months ago

Absolutely love this feature! I prefer the second option too, although it's a breaking change.

palant commented 11 months ago

It would probably make sense to have a default value that works for most people, e.g. ["facebook", "fediverse", "twitter"]. So if they enable the feature but don’t configure it, this is what they will get.

palant commented 11 months ago

Pull request is up: #447