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

The "if" means the default is never used #4955

Merged
merged 1 commit into from
Aug 20, 2024

Conversation

davorg
Copy link
Contributor

@davorg davorg commented Aug 17, 2024

This is a bug fix.

Summary

Fixes the social share include so the default text works as expected.

Context

The current code looks like this:

  {% if site.data.ui-text[site.locale].share_on_label %}
    <h4 class="page__share-title">{{ site.data.ui-text[site.locale].share_on_label | default: "Share on" }}</h4>
  {% endif %}

The if statement means that the default ("Share on") is never used. And I assume that's what most people would want to see.

Also, without the <h4>, we get a HTML validation warning - as the <section class="page__share"> has no header.

Just removing the if/endif lines fixes these problems without changing the behaviour.

@iBug iBug merged commit b939edc into mmistakes:master Aug 20, 2024
2 checks passed
@davorg davorg deleted the fix-social-share branch August 20, 2024 08:23
minyoongi96 pushed a commit to minyoongi96/minyoongi96.github.io that referenced this pull request Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants