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

devto social icon not showing #830

Open
NateDhaliwal opened this issue Dec 19, 2024 · 5 comments
Open

devto social icon not showing #830

NateDhaliwal opened this issue Dec 19, 2024 · 5 comments

Comments

@NateDhaliwal
Copy link

When using the devto social icon, all that shows is a blank box in the footer, not the devto icon. This occurs when you uncomment devto in the social links section in _config.yml, and insert your own profile URL.

@sysop71
Copy link

sysop71 commented Jan 8, 2025

Having a similar issue setting up custom social links. I think the issue may be the sizing of the actual SVG file. I've not yet tested that out yet but per the documentation and this blog post there is an implication of sizing, where if the image is not 16x16 you may have to resize it.

This seems odd to me, as my understand of SVG files is they were vector files, which meant you could size them anyway you wanted to via html/css what have you.

@sysop71
Copy link

sysop71 commented Jan 8, 2025

I have attempted to resize based on the blog post using iloveimg as well as by the documentation using inkscape, i have pared the svg down to just the path information, and still nothing is rendering properly. It seems that in this case the minima css should be able to re-size any image in svg in the social-icons folder without us having to manually go through hoops that are not actually working.

If someone has any other ideas I'm open as I have a handful of icons I'd like to add, TikTok, Discord and Twitch.

@sysop71
Copy link

sysop71 commented Jan 8, 2025

Ok so there appears to be an overall problem with adding custom social-icons, i've followed the documentation i've found and nothign works as a last resort i've rplaced my tiktok.svg with the contents from the instagram.svg in this repo, and still no image is rendered.

@sysop71
Copy link

sysop71 commented Jan 8, 2025

I created this workaround so I could get this up and running now. It reads the SVG files in your _includes/social-icons folder. Assuming you have the SVG files properly set they should render just fine, kind of the deal with vector graphics. Although with this code, you could adjust it to render whatever image you have in there as some of those SVG logos can be quite large.

_includes/social-item.html

<li>
    {% assign entry = include.item %}
    <a {% unless entry.platform == 'rss' %}rel="me" {% endunless %}href="{{ entry.user_url }}" target="_blank" title="{{ entry.title | default: entry.platform }}">
      {% include social-icons/{{ entry.platform | downcase }}.svg %}
    </a>
  </li>

@NateDhaliwal
Copy link
Author

I see. Thanks, I'll try that.

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

No branches or pull requests

2 participants