Closed alemens closed 2 years ago
I haven't investigated deeply, but I would suspect the config merging code in Jekyll here doesn't allow for us to unset values (only override them with other values).
So, looking at the social.html partial in the minima theme, we have lines like:
{%- if social.twitter -%}<li><a .................
I'm thinking a workaround could be to change those to:
{%- if social.twitter && !social.twitter.empty? -%}<li><a ...............
So that way we could "unset" them in our local _config.yml
with:
minima:
social_links:
twitter: ""
[EDIT] Ah, well, I guess it won't work if Liquid won't allow executing arbitrary Ruby... :\
I ended up working around this by using local CSS to apply display: none
to the icons I didn't want.
This issue has been automatically marked as stale because it has not been commented on for at least two months.
The resources of the Jekyll team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master
branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, please consider whether it can be accomplished in another way. If it cannot, please elaborate on why it is core to this project and why you feel more than 80% of users would find this beneficial.
This issue will automatically be closed in two months if no further activity occurs. Thank you for all your contributions.
The issue is still there.
If I put in my _config.yml :
It comes from the theme _config.yml which contain a default value for twitter that could be unset. By the way the same thing happens with all values like social_links.github, author.email and author.name . The easiest way would be to just comment these default values in the theme _config.yml .
Like
title: Your awesome title
author:
# name: GitHub User
# email: your-email@domain.com
...
# generate social links in footer
social_links:
# twitter: jekyllrb
# github: jekyll
# devto: jekyll
# dribbble: jekyll
# facebook: jekyll
Hope my comment will help.
@alemens, @dflorance You'll have to instruct Jekyll to ignore the theme-config explicitly:
# in <source_dir>/_config.yml
ignore_theme_config: true
@ashmaroli you are perfectly right ! My bad for not knowing about this option, from my perspective I think the issue can be close or stale as this option exists.
Description
Even though no twitter declared into
_config.yml
, the footersocial_links
twitter icon still rendered. So to hide it need a manual comment into_includes/social.html
Expected behavior
If no
social_links
twitter declared into_config.yml
I am aspecting this will not be rendered.Steps to reproduce
Create new site
Modify /testingbug/Gemfile to use the GitHub version
Edit _config.yml
Build and update with bundle