Skip to content

Commit

Permalink
Manually correct social media external links
Browse files Browse the repository at this point in the history
Solution options here were:

(1) spend a long time figuring out why the Markdown renderer that's supposed to handle links isn't seeing the "18F on {platform}" links in the social media sidebar, or
(2) manually mark them external.

I opted for (2) just to get the migration done for now. I've opened another issue to handle this more systematically — our renderers are in rough shape.
  • Loading branch information
beechnut committed Aug 13, 2024
1 parent a5c4cc5 commit c30559b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
9 changes: 9 additions & 0 deletions data/social_media.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
-
platform: GitHub
link: https://github.com/18F
html:
class: usa-link--external
rel: noreferrer
image:
light: assets/img/social-icons/svg/github-lightest.svg
dark: assets/img/social-icons/svg/github-darkest.svg
-
platform: Twitter
link: https://twitter.com/18F
html:
class: usa-link--external
rel: noreferrer
image:
light: assets/img/social-icons/svg/twitter-lightest.svg
dark: assets/img/social-icons/svg/twitter-darkest.svg
-
platform: LinkedIn
link: https://www.linkedin.com/company/gsa18f
html:
class: usa-link--external
rel: noreferrer
image:
light: assets/img/social-icons/svg/linkedin-lightest.svg
dark: assets/img/social-icons/svg/linkedin-darkest.svg
Expand Down
3 changes: 2 additions & 1 deletion templates/social-media.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ <h2 class="font-sans-lg text-bold margin-bottom-2">Follow 18F</h2>
{% for item in social_media %}
<li class="margin-bottom-2">
<a href="{{ item.link | url }}"
class="usa-link--alt"
class="usa-link--alt {{ item.html.class }}"
rel="{{ item.html.rel }}"
>
{% image_with_class item.image.light "maxw-3 margin-right-2 text-sub" "" %}
{%- unless item.platform == "RSS feed" -%}18F on {% endunless %}{{ item.platform }}
Expand Down

0 comments on commit c30559b

Please sign in to comment.