Skip to content

Commit

Permalink
2024 year in review (#1369)
Browse files Browse the repository at this point in the history
Co-authored-by: Thomas Bonnet <[email protected]>
Co-authored-by: Armand Philippot <[email protected]>
Co-authored-by: Shinya Fujino <[email protected]>
Co-authored-by: Chris Swithinbank <[email protected]>
Co-authored-by: Adammatthiesen <[email protected]>
  • Loading branch information
6 people authored Jan 17, 2025
1 parent ee0f138 commit 91337c5
Show file tree
Hide file tree
Showing 15 changed files with 799 additions and 42 deletions.
33 changes: 19 additions & 14 deletions src/components/Mention.astro
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,24 @@ export type Props = {
const { name } = Astro.props;
const mention = await getEntry('authors', name);
if (!mention) {
return;
}
const platform = mention.data.bluesky ? 'bluesky' : mention.data.twitter ? 'twitter' : 'mastodon';
const linkUrl = mention.data[platform];
const platformName = platform[0].toUpperCase() + platform.slice(1);
const Tag = linkUrl ? 'a' : 'span';
---

{
mention && (
<span class="m-0 inline-block align-middle leading-none">
<a
href={mention.data.twitter ?? mention.data.mastodon}
title={`Follow ${mention.data.name} on ${mention.data.twitter ? 'Twitter' : 'Mastodon'}`}
class="m-0 inline-flex items-center space-x-1 whitespace-nowrap font-medium"
>
<Avatar name={name} />
<span class="underline">{mention.data.name}</span>
</a>
</span>
)
}
<span class="m-0 inline-block align-middle leading-none">
<Tag
href={linkUrl}
title={linkUrl && `Follow ${mention.data.name} on ${platformName}`}
class="m-0 inline-flex items-center space-x-1 whitespace-nowrap font-medium"
>
<Avatar name={name} />
<span class="underline">{mention.data.name}</span>
</Tag>
</span>
24 changes: 20 additions & 4 deletions src/components/Note.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,27 @@ export interface Props {
title?: string;
}
const { title } = Astro.props;
const titleId = title?.replace(/[^\w]/g, '-').replace(/-+/g, '-').toLowerCase();
---

<aside class="my-6 rounded border border-astro-gray-400 px-6 py-4">
<div class="my-3 space-y-3">
{title && <h3>{title}</h3>}
<slot />
<aside
class="relative my-6 rounded border border-astro-gray-400 px-6 py-4"
aria-labelledby={titleId}
>
<div class="flex my-3 gap-3 flex-col items-start">
{
title && (
<p
id={titleId}
class="code m-px -translate-y-px -translate-x-px rounded-md bg-orange-yellow-gradient px-3 py-1 text-sm font-bold uppercase tracking-widest text-astro-gray-700"
>
{title}
</p>
)
}
<div class="space-y-3">
<slot />
</div>
</div>
</aside>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
713 changes: 713 additions & 0 deletions src/content/blog/year-in-review-2024.mdx

Large diffs are not rendered by default.

17 changes: 10 additions & 7 deletions src/content/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,16 @@ export const collections = {
authors: defineCollection({
loader: file('src/data/authors/authors.json'),
schema: ({ image }) =>
z.object({
image: image().optional(),
name: z.string(),
twitter: z.string().url().optional(),
mastodon: z.string().url().optional(),
github: z.string().url().optional(),
}),
z
.object({
image: image().optional(),
name: z.string(),
twitter: z.string().url().optional(),
mastodon: z.string().url().optional(),
bluesky: z.string().url().optional(),
github: z.string().url().optional(),
})
.strict(),
}),
blog: defineCollection({
schema: z.object({
Expand Down
52 changes: 36 additions & 16 deletions src/data/authors/authors.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,21 @@
"astro-team": {
"name": "Astro Team",
"image": "./astro-team.webp",
"twitter": "https://twitter.com/astrodotbuild"
"twitter": "https://twitter.com/astrodotbuild",
"bluesky": "https://bsky.app/profile/astro.build",
"mastodon": "https://m.webtoo.ls/@astro"
},
"ben": {
"name": "Ben Holmes",
"image": "./ben.webp",
"twitter": "https://twitter.com/bholmesdev"
"twitter": "https://twitter.com/bholmesdev",
"bluesky": "https://bsky.app/profile/bholmes.dev"
},
"bjorn": {
"name": "Bjorn Lu",
"image": "./bjorn.webp",
"twitter": "https://twitter.com/bluwyoo"
"twitter": "https://twitter.com/bluwyoo",
"bluesky": "https://bsky.app/profile/bluwy.me"
},
"chris": {
"name": "Chris Swithinbank",
Expand All @@ -21,13 +25,13 @@
},
"dan": {
"name": "Dan Jutan",
"image": "./dan.webp",
"twitter": "https://twitter.com/jutanium"
"image": "./dan.webp"
},
"drew": {
"name": "Drew Powers",
"image": "./drew.webp",
"twitter": "https://twitter.com/drwpow"
"twitter": "https://twitter.com/drwpow",
"bluesky": "https://bsky.app/profile/pow.rs"
},
"elian": {
"name": "Elian Van Cutsem",
Expand All @@ -38,12 +42,14 @@
"ema": {
"name": "Emanuele Stoppa",
"image": "./ema.webp",
"twitter": "https://twitter.com/ematipico"
"twitter": "https://twitter.com/ematipico",
"bluesky": "https://bsky.app/profile/ematipico.xyz"
},
"erika": {
"name": "Erika",
"image": "./erika.webp",
"mastodon": "https://m.webtoo.ls/@erika"
"mastodon": "https://m.webtoo.ls/@erika",
"bluesky": "https://bsky.app/profile/erika.florist"
},
"fred": {
"name": "Fred Schott",
Expand All @@ -58,7 +64,8 @@
"hideoo": {
"name": "HiDeoo",
"image": "./hideoo.png",
"twitter": "https://github.com/HiDeoo"
"twitter": "https://github.com/HiDeoo",
"bluesky": "https://bsky.app/profile/hideoo.dev"
},
"jon": {
"name": "Jonathan Neal",
Expand All @@ -73,32 +80,44 @@
"martrapp": {
"name": "Martin Trapp",
"image": "./martrapp.webp",
"github": "https://github.com/martrapp"
"github": "https://github.com/martrapp",
"bluesky": "https://bsky.app/profile/martr.app"
},
"matt": {
"name": "Matt Kane",
"image": "./matt.webp",
"twitter": "https://x.com/ascorbic"
"twitter": "https://x.com/ascorbic",
"bluesky": "https://bsky.app/profile/mk.gg"
},
"matthew": {
"name": "Matthew Phillips",
"image": "./matthew.webp",
"twitter": "https://twitter.com/matthewcp"
"twitter": "https://twitter.com/matthewcp",
"bluesky": "https://bsky.app/profile/fancypenguin.party"
},
"nate": {
"name": "Nate Moore",
"image": "./nate.webp",
"twitter": "https://twitter.com/n_moore"
"twitter": "https://twitter.com/n_moore",
"bluesky": "https://bsky.app/profile/natemoo.re"
},
"reuben": {
"name": "Reuben Tier",
"image": "./reuben.png",
"twitter": "https://twitter.com/theotterlord"
"twitter": "https://twitter.com/theotterlord",
"bluesky": "https://bsky.app/profile/otterlord.dev"
},
"sarah": {
"name": "Sarah Rainsberger",
"image": "./sarah.webp",
"mastodon": "https://mastodon.social/@sarah11918"
"mastodon": "https://mastodon.social/@sarah11918",
"bluesky": "https://bsky.app/profile/sarah11918.rainsberger.ca"
},
"shinya": {
"name": "Shinya Fujino",
"image": "./shinya.webp",
"twitter": "https://x.com/ondemocracy",
"bluesky": "https://bsky.app/profile/fujino.dev"
},
"thuy": {
"name": "Thuy Doan",
Expand All @@ -113,6 +132,7 @@
"yan": {
"name": "Yan Thomas",
"image": "./yan.webp",
"twitter": "https://twitter.com/yanthomasdev"
"twitter": "https://twitter.com/yanthomasdev",
"bluesky": "https://bsky.app/profile/yanthomas.dev"
}
}
Binary file added src/data/authors/shinya.webp
Binary file not shown.
2 changes: 1 addition & 1 deletion src/pages/blog/[slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const structuredData = {
'@type': id === 'astro-team' ? 'Organization' : 'Person',
'@id': `https://astro.build/blog/#/author/${id}`,
name: data.name,
sameAs: data.twitter || data.mastodon || data.github,
sameAs: data.bluesky || data.twitter || data.mastodon || data.github,
image: data.image && new URL(data.image.src, Astro.site),
})),
};
Expand Down

0 comments on commit 91337c5

Please sign in to comment.