USRSE / usrse.github.io

US RSE umbrella web page
https://us-rse.org
28 stars 83 forks source link

Facebook and LinkedIn "Share buttons" on blog posts are broken #1201

Closed lparsons closed 1 year ago

lparsons commented 1 year ago

Clicking on the "Share" button at the bottom of a post for Facebook and LinkedIn leads to an error. The Twitter and Reddit links seem to work.

Example Post: https://us-rse.org/2023-06-26-pride-spotlight-lynn-conway/

Facebook image

LinkedIn image

lrasmus commented 1 year ago

It looks like the links to be shared are not including the full URL.

E.g., Facebook is https://www.facebook.com/share.php?u=/2023-06-26-pride-spotlight-lynn-conway/

But should be https://www.facebook.com/share.php?u=https://us-rse.org/2023-06-26-pride-spotlight-lynn-conway/

This affects all of the links, it just appears as errors in LinkedIn and Facebook who are detecting that it's not a fully qualified URL

lrasmus commented 1 year ago

Not sure entirely about how Jekyll works and our setup, but I can see we are referencing site.url (e.g., https://github.com/USRSE/usrse.github.io/blob/main/_includes/buttons/share-buttons.html#L4)

But in our config file, site.url is blank: https://github.com/USRSE/usrse.github.io/blob/main/_config.yml#L7-L8

So it makes sense why the full URL isn't showing, but I'm not sure when/why this was changed.

lrasmus commented 1 year ago

This appears to be the commit where it was changed. I'm not seeing any specific reason to have url empty, so I will propose a PR to bring it back.

aholmes commented 1 year ago

This issue extends to all references to the site.url variable. For example, the "inclusive definition" link here does not include the domain.