Replies: 1 comment 1 reply
-
This is super cool. Thanks for posting, I am going to use it in my site! A few suggestions if I may to make it a bit better and more portable.
These changes will help make a good thing a bit better. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone, I'm here to share a customization to the sidebar - adding friend links.
How to achieve?
Add the following code to
_includes/sidebar.html
(before the button at the bottom of the sidebar.):<!-- friend links --> {% if site.data.friends %} {% include friends.html %} {% endif %}
Then create a new file
_includes/friends.html
:The relevant style design can be added to
assets/css/jekyll-theme-chirpy.scss
:Note that here I borrowed the color variable name from
subtitle
, of course, you can also define a new variable to control the color in light and dark modes.Then you can add friend links in
_data/friends.yml
, e.g. :Effect
See the following figures and my BLOG:
Note
This method is only suitable for adding a small number of friend links, otherwise, they will occupy space at the bottom buttons. If you need to add a large number of friend links, my suggestion is to create a new file "friends.md" in
_tabs
and place all the friend links there.Beta Was this translation helpful? Give feedback.
All reactions