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

Avoid hardcoded socials ordering #2882

Closed
2 tasks done
pazz opened this issue Dec 9, 2024 · 4 comments · Fixed by #2885
Closed
2 tasks done

Avoid hardcoded socials ordering #2882

pazz opened this issue Dec 9, 2024 · 4 comments · Fixed by #2885

Comments

@pazz
Copy link
Contributor

pazz commented Dec 9, 2024

Have you checked that your feature request isn't already filed?

  • I read through FAQ and searched through the past issues, none of which addressed my feature request.
  • Yes, I have checked that this feature request isn't already filed.

Description & Motivation

No response

Pitch

ATM, the order of socials links at the bottom of about pages are hardcoded to an arbitrary (non-alphabetical) ordering.
To sort them, one has to adjust the liquid template which makes it more difficult to later update one's website by rebasing to the main branch.

Alternatives

In my opinion, a neater way would be to keep socials info in _data/ and leave it up to users to (re)define the list of chosen socials in yaml.

Added benefit: in most cases, all one needs is a URL and an icon string (font awesome or academicons etc).
If there was a YAML data structure that contains entries with these two, you do not need to add anything to the main template to enable users to add new socials by just providing url and icon.

Yes, I am aware that some socials are special (weechat and email). In the latter case, I'd actually prefer to have email optional anyway..
Thanks!

Additional context

No response

@george-gca
Copy link
Collaborator

Just to be clear, your idea is to move the social code to a yml file, then in the social.liquid only loop through the yml and add in the order defined there, right? This won't exactly solve the merge issues, but I agree that it is a more elegant solution.

@pazz
Copy link
Contributor Author

pazz commented Dec 11, 2024

That's the idea yes.
Perhaps split socials.liquid so that it iterates over the list and for each one invokes social.liquid, which then does a case distinction dealing with the special cases (weechat email) and otherwise just uses the url/icon properties.

I agree that this does not solve merge issues but it does allow for an easy re-ordering of the icons.
And yes, this is a non-constructive feature request in that I do not have the time to send a PR and deal with the inevitable back and forth to get it clean and merged. Sorry :)

@george-gca
Copy link
Collaborator

This is kind of easy to implement, so I can do it. But only after I can fix the missing piece to merge #2866. I really struggle with small pieces of front end details.

@pazz
Copy link
Contributor Author

pazz commented Dec 12, 2024

This is great, I'm actually looking forward to rebasing now 😎 thanks!

raishish pushed a commit to raishish/raishish.github.io that referenced this issue Dec 15, 2024
Fixes alshedivat#2882, added support for
[scholar-icons](https://github.com/louisfacun/scholar-icons) and
[LeetCode](https://leetcode.com/).

---------

Signed-off-by: George Araújo <george.gcac@gmail.com>
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