fix: homepage now links published rage posts, fix author name

- Fixed author name from 'Ken Hiatt' to 'Ken Chau'
- Rage series items now dynamically link to published posts
  (4 linked with reading times, 2 still 'Coming soon')
- Published items show reading time and have hover states
- Series items matched to posts by slug lookup

🤖 Generated with Amplifier

Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
This commit is contained in:
Ken
2026-05-27 04:46:33 +00:00
parent 7f0453949e
commit f7851fb3a7
+70 -11
View File
@@ -8,14 +8,31 @@ const posts = await getCollection('posts');
const sortedPosts = posts.sort((a, b) => b.data.date.getTime() - a.data.date.getTime()); const sortedPosts = posts.sort((a, b) => b.data.date.getTime() - a.data.date.getTime());
const base = import.meta.env.BASE_URL.replace(/\/?$/, '/'); const base = import.meta.env.BASE_URL.replace(/\/?$/, '/');
// Match rage series titles to actual published posts by slug
const ragePosts: Record<string, string> = {
'Your Build Cache Is Lying to You': 'your-build-cache-is-lying-to-you',
'Two-Phase Fingerprinting: BuildXL\u2019s Deep Magic': 'two-phase-fingerprinting-buildxls-deep-magic',
'Hooking Syscalls Without a Kernel Driver': 'hooking-syscalls-without-a-kernel-driver',
'TypeScript 7 Makes the Build Harness More Important': 'typescript-7-makes-the-build-harness-more-important',
};
const rageSeries = [ const rageSeries = [
{ title: 'Your Build Cache Is Lying to You', status: 'coming-soon' }, 'Your Build Cache Is Lying to You',
{ title: 'Two-Phase Fingerprinting: BuildXL\u2019s Deep Magic', status: 'coming-soon' }, 'Two-Phase Fingerprinting: BuildXL\u2019s Deep Magic',
{ title: 'Hooking Syscalls Without a Kernel Driver', status: 'coming-soon' }, 'Hooking Syscalls Without a Kernel Driver',
{ title: 'TypeScript 7 Makes the Build Harness More Important', status: 'coming-soon' }, 'TypeScript 7 Makes the Build Harness More Important',
{ title: 'node_modules in a Content-Addressed Store', status: 'coming-soon' }, 'node_modules in a Content-Addressed Store',
{ title: 'What I Learned Maintaining Lage and Why I Rewrote It', status: 'coming-soon' }, 'What I Learned Maintaining Lage and Why I Rewrote It',
]; ].map(title => {
const slug = ragePosts[title];
const post = slug ? posts.find(p => p.id === slug) : null;
return {
title,
slug: slug || null,
published: !!post,
readingTime: post?.body ? getReadingTime(post.body) : null,
};
});
--- ---
<BaseLayout title='Crash Test Dev'> <BaseLayout title='Crash Test Dev'>
@@ -24,7 +41,7 @@ const rageSeries = [
<section class="hero" aria-label="Introduction"> <section class="hero" aria-label="Introduction">
<h1 class="site-title">Crash Test Dev</h1> <h1 class="site-title">Crash Test Dev</h1>
<p class="tagline">Engineering judgment, tested against reality.</p> <p class="tagline">Engineering judgment, tested against reality.</p>
<p class="byline">By Ken Hiatt</p> <p class="byline">By Ken Chau</p>
</section> </section>
<hr class="divider" /> <hr class="divider" />
@@ -46,9 +63,18 @@ const rageSeries = [
<p class="series-description">A six-part investigation into rage, a Rust monorepo build system that fuses BuildXL's provable correctness with lage's ergonomics. From syscall sandboxing to content-addressed storage.</p> <p class="series-description">A six-part investigation into rage, a Rust monorepo build system that fuses BuildXL's provable correctness with lage's ergonomics. From syscall sandboxing to content-addressed storage.</p>
<ol class="series-list"> <ol class="series-list">
{rageSeries.map((item) => ( {rageSeries.map((item) => (
<li class="series-item"> <li class={`series-item ${item.published ? 'published' : ''}`}>
<span class="series-item-title">{item.title}</span> {item.published ? (
<span class="series-item-status">Coming soon</span> <a href={`${base}posts/${item.slug}/`} class="series-item-link">
<span class="series-item-title">{item.title}</span>
<span class="series-item-meta">{item.readingTime} min</span>
</a>
) : (
<>
<span class="series-item-title">{item.title}</span>
<span class="series-item-status">Coming soon</span>
</>
)}
</li> </li>
))} ))}
</ol> </ol>
@@ -222,6 +248,39 @@ const rageSeries = [
margin-left: var(--space-2); margin-left: var(--space-2);
} }
.series-item-link {
display: flex;
justify-content: space-between;
align-items: baseline;
width: 100%;
text-decoration: none;
color: inherit;
}
.series-item-link:hover {
text-decoration: none;
}
.series-item-link:hover .series-item-title {
color: var(--accent-primary);
}
.series-item-meta {
font-family: var(--font-evidence);
font-size: var(--type-xs);
color: var(--text-tertiary);
flex-shrink: 0;
margin-left: var(--space-2);
}
.series-item.published {
border-color: var(--border-default);
}
.series-item.published .series-item-title {
transition: color var(--duration-fast) var(--ease-default);
}
/* All posts */ /* All posts */
.all-posts { .all-posts {
margin-bottom: var(--space-12); margin-bottom: var(--space-12);