Skip to content

Commit 75fca9f

Browse files
authored
Merge pull request #3347 from thiswillbeyourgithub/add-mastodon-share-button
feat: add mastodon share button
2 parents 927d725 + e49832a commit 75fca9f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

_includes/social-share.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,7 @@ <h4 class="page__share-title">{{ site.data.ui-text[site.locale].share_on_label |
1111

1212
<a href="https://www.linkedin.com/shareArticle?mini=true&url={{ base_path }}{{ page.url }}" class="btn btn--linkedin" title="{{ site.data.ui-text[site.locale].share_on_label | default: 'Share on' }} LinkedIn"><i class="fab fa-linkedin" aria-hidden="true"></i><span> LinkedIn</span></a>
1313

14+
<a href="https://www.addtoany.com/add_to/mastodon?linkurl={{ base_path | append: page.url | url_encode }}" class="btn btn--mastodon" title="{{ site.data.ui-text[site.locale].share_on_label | default: 'Share on' }} Mastodon"><i class="fab fa-mastodon" aria-hidden="true"></i><span> Mastodon</span></a>
15+
1416
<a href="https://x.com/intent/post?text={{ base_path }}{{ page.url }}" class="btn btn--x" title="{{ site.data.ui-text[site.locale].share_on_label | default: 'Share on' }} X"><i class="fab fa-x-twitter" aria-hidden="true"></i><span> X (formerly Twitter)</span></a>
1517
</section>

_sass/layout/_buttons.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@
123123
(twitter, $twitter-color),
124124
(google-plus, $google-plus-color),
125125
(linkedin, $linkedin-color);
126+
(mastodon, $mastodon-color),
126127

127128
@each $socialnetwork, $color in $social {
128129
&--#{$socialnetwork} {
@@ -151,4 +152,4 @@
151152
&--small {
152153
font-size: $type-size-7;
153154
}
154-
}
155+
}

0 commit comments

Comments
 (0)