Skip to content

Commit

Permalink
Merge pull request #2580 from mainmatter/gabor/mastodon-author-handle
Browse files Browse the repository at this point in the history
Add Mastodon & Bluesky handle support to author profiles
  • Loading branch information
zeppelin authored Dec 12, 2024
2 parents 5fce0cb + db3cb11 commit 21e6a0f
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,11 @@ module.exports = function (eleventyConfig) {
return response.data.replace("<svg", `<svg focusable="false" role="presentation"`);
});

eleventyConfig.addShortcode("mastodonHandleUrl", handle => {
const [user, server] = handle.split("@").filter(Boolean);
return `https://${server}/@${user}`;
});

eleventyConfig.setServerOptions({
watch: ["./dist/assets/css/*.css", "./dist/assets/js/*.js"],
});
Expand Down
1 change: 1 addition & 0 deletions src/authors/algo_luca.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
name: "Luca Palmieri"
github: LukeMathWalker
twitter: algo_luca
mastodon: "@[email protected]"
bio: "Principal Engineering Consultant"
---
2 changes: 2 additions & 0 deletions src/authors/marcoow.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@ name: "Marco Otte-Witte"
github: marcoow
twitter: marcoow
linkedin: marco-otte-witte
mastodon: "@[email protected]"
bluesky: marcoow.bsky.social
bio: "Founder and Managing Director of Mainmatter"
---
2 changes: 2 additions & 0 deletions src/authors/nickschot.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@
name: "Nick Schot"
github: nickschot
twitter: nickschot
bluesky: nickschot.bsky.social
mastodon: "@[email protected]"
bio: "Senior Software Engineer"
---
1 change: 1 addition & 0 deletions src/authors/oscard0m_.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
name: "Oscar Dominguez"
github: oscard0m
twitter: oscard0m_
mastodon: "@[email protected]"
bio: "Software Engineer"
---
2 changes: 2 additions & 0 deletions src/authors/paoloricciuti.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@ name: "Paolo Ricciuti"
github: paoloricciuti
twitter: paoloricciuti
linkedin: paolo-ricciuti-571a91187
bluesky: paolo.ricciuti.me
mastodon: "@[email protected]"
bio: 'Senior Software Engineer at Mainmatter, Co-creator of <a href="https://sveltelab.dev">sveltelab.dev</a>'
---
3 changes: 2 additions & 1 deletion src/authors/pichfl.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
name: "Florian Pichler"
github: pichfl
twitter: pichfl
linkedin: pichfl
mastodon: "@[email protected]"
bluesky: pichfl.bsky.social
bio: "Consultant for Technology and Design at Mainmatter"
---
2 changes: 1 addition & 1 deletion src/authors/real_ate.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: "Chris Manson"
github: mansona
twitter: real_ate
linkedin: realate
mastodon: "@[email protected]"
bio: "Senior Software Engineer, Ember Learning Core Team member"
---
2 changes: 1 addition & 1 deletion src/authors/zeppelin.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: "Gabor Babicz"
github: zeppelin
twitter: xeppelin
mastodon: "@[email protected]"
linkedin: xeppelin
bio: "Senior Software Engineer"
---
16 changes: 16 additions & 0 deletions src/components/author-socials.njk
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,22 @@
</a>
</li>
{% endif %}
{% if author.data.mastodon %}
<li>
<a class="author-socials__icon" href="{% mastodonHandleUrl author.data.mastodon %}">
{% include 'svg/social-mastodon.njk' %}
<span class="screenreader">{{ author.data.mastodon }} on Mastodon</span>
</a>
</li>
{% endif %}
{% if author.data.bluesky %}
<li>
<a class="author-socials__icon" href="https://bsky.app/profile/{{ author.data.bluesky }}">
{% include 'svg/social-bluesky.njk' %}
<span class="screenreader">{{ author.data.bluesky }} on Bluesky</span>
</a>
</li>
{% endif %}
</ul>
{% endif %}
{%- endmacro -%}

0 comments on commit 21e6a0f

Please sign in to comment.