alpha
Login
or
Join now
pds.dad
/
my-website
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
WIP: My personal website
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
redirect old links to new
author
Bailey Townsend
date
2 weeks ago
(Jun 7, 2026, 6:03 PM -0500)
commit
9b345cc5
9b345cc5aaeca78c1e95ccade704c30223532d49
parent
b9ace546
b9ace5465265d4c6cb4f8dbf13d33f03aff79181
+39
-1
4 changed files
Expand all
Collapse all
Unified
Split
src
lib
articles.ts
components
Writing.svelte
server
atproto
interactions.ts
routes
articles
[slug]
+server.ts
+21
src/lib/articles.ts
Reviewed
···
1
1
+
export const LEAFLET_BASE = 'https://retrobailey.leaflet.pub';
2
2
+
3
3
+
export type ArticleSlug = { slug: string; leafletSlug: string };
4
4
+
5
5
+
export const ARTICLE_SLUGS = [
6
6
+
{ slug: 'getting-started-with-rust-an-rp2040', leafletSlug: '3mnnskzjn6k2c' },
7
7
+
{ slug: 'mays-recap', leafletSlug: '3mnqarcodjk2k' },
8
8
+
{ slug: 'missed-fundamentals', leafletSlug: '3mnnvofo7y22b' },
9
9
+
{ slug: 'pico-sapien', leafletSlug: '3mnnrrvtjos2o' },
10
10
+
{ slug: 'pico-w-webserver-with-rust', leafletSlug: '3mnnti2hpkk2u' },
11
11
+
{ slug: 'poststation-on-the-rp2350', leafletSlug: '3mnpznkgclc2r' },
12
12
+
{ slug: 'rust-on-the-10-cent-microcontroller', leafletSlug: '3mnpv64zct22z' },
13
13
+
{ slug: 'rust-on-the-3ds', leafletSlug: '3mnq454jue22p' },
14
14
+
{ slug: 'rusty-statusphere', leafletSlug: '3mnqaa5dj2s2e' }
15
15
+
] as const;
16
16
+
17
17
+
export const articleTarget = (slug: string) => {
18
18
+
const article = ARTICLE_SLUGS.find((a) => a.slug === slug);
19
19
+
if (!article) return null;
20
20
+
return `${LEAFLET_BASE}/${article.leafletSlug}`;
21
21
+
};
+3
src/lib/components/Writing.svelte
Reviewed
···
81
81
>
82
82
Latest Posts
83
83
</h2>
84
84
+
<span class="text-md mt-2 px-2 text-center font-urbanist md:mt-4 md:px-5 md:text-xl">
85
85
+
My most recent posts
86
86
+
</span>
84
87
{#await latestPosts}
85
88
<div class="container mt-10 grid gap-10 p-4 md:grid-cols-2 xl:grid-cols-3">
86
89
{#each Array(2) as _, i (i)}
-1
src/lib/server/atproto/interactions.ts
Reviewed
···
26
26
`?target=${encodeURIComponent(target)}` +
27
27
`&collection=${encodeURIComponent(collection)}` +
28
28
`&path=${encodeURIComponent(path)}`;
29
29
-
console.log(`Fetching Constellation count: ${url}`);
30
29
const res = await fetch(url);
31
30
if (!res.ok) {
32
31
console.warn(`Constellation count failed: ${res.status} ${res.statusText}`);
+15
src/routes/articles/[slug]/+server.ts
Reviewed
···
1
1
+
import { error, redirect } from '@sveltejs/kit';
2
2
+
import type { RequestHandler } from './$types';
3
3
+
import { ARTICLE_SLUGS, articleTarget, type ArticleSlug } from '$lib/articles';
4
4
+
5
5
+
export const GET: RequestHandler = ({ params }) => {
6
6
+
const { slug } = params;
7
7
+
if (!(ARTICLE_SLUGS as readonly ArticleSlug[]).filter((x) => x.slug === slug)) {
8
8
+
error(404, 'Unknown article');
9
9
+
}
10
10
+
const target = articleTarget(slug);
11
11
+
if (!target) {
12
12
+
error(500, 'Article target not found');
13
13
+
}
14
14
+
redirect(301, target);
15
15
+
};