Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Plugins

Social media plugin and font awesome

Solved by Junillon View solution

Started by Junillon 4 years ago · 5 replies · 738 views
4 years ago

Hi, I come back (again ;)) to find some clue about fontawesome.
I recently added two plugins : social-media-links and embed-fontawesome.
I installed the second one because at first I thought problems where coming from it.
Actually when displaying the bullets from socialmedia, I get a "?" and when digging into code, everything seems ok (cf. sshot) ?
does anyone have the social media plugin working ?
thanks in advance for any ideas.
Capture d’écran 2022-05-04 à 20.01.53|666x153
Capture d’écran 2022-05-04 à 20.02.04|172x42

last edited 05/04/22 by Junillon
4 years ago Solution

ok, I did some more investigations.
First, of course there is some svg stuff inside, this is the code for "?"... how stupid I am.
That was just meaning it did not find fa-twitter for example.
I decided then to remove social-media-links as clean-blog theme already got some lines for it. Same behavior.
So, I also removed "embed font awesome" plugin. And... miracle 🙂 I finally got icons !
so strange...
I actually have no time to dig further and understand why, it's working and it's ok for me. But one day, I will search and understand why 😃

👍 1
4 years ago

@Francois, Plugin embed fontawesome tries to replace all fontawesome icons it finds in a page by injecting inline svg code into the html of the page.

The svg code for each icon must be provided in folder */user/data/fontawesome/**

When processing the page, if it doesn't find the proper .svg file below folder /user/data/fontawesome/*, it will (depending on the config) replace the current icon with inline svg code which shows a question mark. That's the svg code you showed above.

4 years ago

thanks for the solution @pamtbaau :🙂 Sometimes, simple things are much more better !
I guess embed font awesome is here for something, but in my case, it made it worse. Why fa-twitter / facebook or pinterest were not found... mystery.

4 years ago

@Francois,

@Francois:
Why fa-twitter / facebook or pinterest were not found… mystery.

That's not a mystery... My explanation above might not have been be clear enough though...

The plugin does not use icon definitions provided by the theme, but only looks for files in folder */user/data/fontawesome/** matching the name for the fontawesome class .

If you don't provide svg files in folder /user/data/fontawesome/ for each and every fontawesome icon you use, the plugin will inject the svg code for a question mark.

4 years ago

Ooooh I understand! It’ not a widget to improve or extend but to replace ! Sorry to be that slow brain 🫢🤣

Suggested topics

Topic Participants Replies Views Activity
Plugins · by Rene, 1 week ago
2 43 1 week ago
Plugins · by Xavier, 4 weeks ago
2 54 4 weeks ago
Plugins · by Luka Prinčič, 7 years ago
3 1181 1 month ago
Plugins · by Sebastian van de Meer, 1 month ago
1 48 1 month ago
Plugins · by PIERROT Alain, 2 months ago
3 73 2 months ago