Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Mastodon & Bluesky handle support to author profiles #2580

Merged
merged 6 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
---
1 change: 1 addition & 0 deletions src/authors/marcoow.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ name: "Marco Otte-Witte"
github: marcoow
twitter: marcoow
linkedin: marco-otte-witte
mastodon: "@[email protected]"
zeppelin marked this conversation as resolved.
Show resolved Hide resolved
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]"
zeppelin marked this conversation as resolved.
Show resolved Hide resolved
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>'
---
1 change: 1 addition & 0 deletions src/authors/pichfl.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ name: "Florian Pichler"
github: pichfl
twitter: pichfl
linkedin: pichfl
mastodon: "@[email protected]"
bio: "Consultant for Technology and Design at Mainmatter"
---
1 change: 1 addition & 0 deletions src/authors/real_ate.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ 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 -%}
Loading