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:
+68
-9
@@ -8,14 +8,31 @@ const posts = await getCollection('posts');
|
||||
const sortedPosts = posts.sort((a, b) => b.data.date.getTime() - a.data.date.getTime());
|
||||
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 = [
|
||||
{ title: 'Your Build Cache Is Lying to You', status: 'coming-soon' },
|
||||
{ title: 'Two-Phase Fingerprinting: BuildXL\u2019s Deep Magic', status: 'coming-soon' },
|
||||
{ title: 'Hooking Syscalls Without a Kernel Driver', status: 'coming-soon' },
|
||||
{ title: 'TypeScript 7 Makes the Build Harness More Important', status: 'coming-soon' },
|
||||
{ title: 'node_modules in a Content-Addressed Store', status: 'coming-soon' },
|
||||
{ title: 'What I Learned Maintaining Lage and Why I Rewrote It', status: 'coming-soon' },
|
||||
];
|
||||
'Your Build Cache Is Lying to You',
|
||||
'Two-Phase Fingerprinting: BuildXL\u2019s Deep Magic',
|
||||
'Hooking Syscalls Without a Kernel Driver',
|
||||
'TypeScript 7 Makes the Build Harness More Important',
|
||||
'node_modules in a Content-Addressed Store',
|
||||
'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'>
|
||||
@@ -24,7 +41,7 @@ const rageSeries = [
|
||||
<section class="hero" aria-label="Introduction">
|
||||
<h1 class="site-title">Crash Test Dev</h1>
|
||||
<p class="tagline">Engineering judgment, tested against reality.</p>
|
||||
<p class="byline">By Ken Hiatt</p>
|
||||
<p class="byline">By Ken Chau</p>
|
||||
</section>
|
||||
|
||||
<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>
|
||||
<ol class="series-list">
|
||||
{rageSeries.map((item) => (
|
||||
<li class="series-item">
|
||||
<li class={`series-item ${item.published ? 'published' : ''}`}>
|
||||
{item.published ? (
|
||||
<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>
|
||||
))}
|
||||
</ol>
|
||||
@@ -222,6 +248,39 @@ const rageSeries = [
|
||||
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 {
|
||||
margin-bottom: var(--space-12);
|
||||
|
||||
Reference in New Issue
Block a user