Skip to content

Conversation

@JasonRaveling
Copy link
Contributor

… Twitter username has been configured before displaying the icon in as a contact.

Ensures a GitHub or Twitter username is configured in _config.yml before displaying them in the sidebar. Adds a conditional to capture/assign url so that it is nil if no username was provided. That way when the check for url is done for building the link, it will be skipped if no username is configured.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Improvement (refactoring and improving code)

Description

Before this commit, GitHub and Twitter icons would be displayed on the sidebar, even if you deleted the username from _config.yml. In that case, the logo would just appear with a link to the root site (e.g. twitter.com instead of twitter.com/some_user). This fix adds logic so that when _includes/sidebar.html is rendered it will check if _config.yml has an entry for it. If no entry is configured the icon will not be displayed.

… Twitter username has been configured before displaying the icon in as a contact.

Ensures a GitHub or Twitter username is configured in `_config.yml` before displaying them in the sidebar. Adds a conditional to capture/assign `url` so that it is `nil` if no username was provided. That way when the check for `url` is done for building the link, it will be skipped if no username is configured.
…splaying the icon as a contact.

Ensures a GitHub or Twitter username is configured in `_config.yml` before displaying them in the sidebar. Adds a conditional to capture/assign `url` so that it is `nil` if no username was provided. That way when the check for `url` is done for building the link, it will be skipped if no username is configured.
…sonRaveling/jekyll-theme-chirpy into sidebar-contacts-only-when-configured
@JasonRaveling
Copy link
Contributor Author

Closing because I suspect it will never pass commit linting. Rebasing to amend the commit message doesn't seem to haven helped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant