- issues collection (ISO-week slug, week, dek, rich-text body); home, /issues, and /issues/<week> pages; seed/issues.json holds three sketched issues (W38-W40) from public diigo bookmarks, editorial lines marked (draft); issues-sketch.md is the dry run behind them - microformats: h-feed of h-entry lists; an issue is an h-entry (p-name, dt-published, p-summary, e-content); off-site links render as h-cite, /tag/<tag> links as rel-tag p-category (CiteLink.astro) - diigo tags: shown on each bookmark and attached to issues via the tag taxonomy (now posts + issues); /tag/<tag> lists issues - demo blog content gone: posts dropped from the seed, home page lists issues, site title/tagline, footer About widget, and About page rewritten; nav is Home / About / Issues; search and RSS cover issues - .column container gives potluck's pages the header's margins Generated-by: Claude Opus 5.5
60 lines
1.6 KiB
Plaintext
60 lines
1.6 KiB
Plaintext
---
|
|
import { getEmDashEntry, decodeSlug } from "emdash";
|
|
import { PortableText } from "emdash/ui";
|
|
import Base from "../../layouts/Base.astro";
|
|
import CiteLink from "../../components/CiteLink.astro";
|
|
|
|
const slug = decodeSlug(Astro.params.slug);
|
|
if (!slug) return Astro.redirect("/404");
|
|
|
|
const { entry: issue, cacheHint } = await getEmDashEntry("issues", slug);
|
|
if (!issue) return Astro.redirect("/404");
|
|
|
|
if (Astro.cache?.enabled) Astro.cache.set(cacheHint);
|
|
|
|
const published = issue.data.publishedAt;
|
|
---
|
|
|
|
<Base
|
|
title={issue.data.title}
|
|
description={issue.data.dek}
|
|
type="article"
|
|
publishedTime={published?.toISOString()}
|
|
content={{ collection: "issues", id: issue.data.id, slug: issue.id }}
|
|
>
|
|
<div class="column">
|
|
<article class="issue h-entry">
|
|
<header>
|
|
<p class="week">
|
|
<a class="u-url" href={`/issues/${issue.id}`}>{issue.data.week}</a>
|
|
{published && <> · <time class="dt-published" datetime={published.toISOString()}>{published.toISOString().slice(0, 10)}</time></>}
|
|
</p>
|
|
<h1 class="p-name">{issue.data.title}</h1>
|
|
{issue.data.dek && <p class="p-summary"><i>{issue.data.dek}</i></p>}
|
|
</header>
|
|
<div class="e-content">
|
|
<PortableText value={issue.data.body ?? []} components={{ mark: { link: CiteLink } }} />
|
|
</div>
|
|
<footer><a href="/issues">all issues</a></footer>
|
|
</article>
|
|
</div>
|
|
</Base>
|
|
|
|
<style>
|
|
.issue :global(h1),
|
|
.issue :global(h2),
|
|
.issue :global(p),
|
|
.issue :global(ul) {
|
|
margin-block: 0.75em;
|
|
}
|
|
.issue :global(h2) {
|
|
margin-block-start: 1.5em;
|
|
}
|
|
.issue :global(ul) {
|
|
padding-inline-start: 1.5em;
|
|
}
|
|
.week {
|
|
font-family: var(--font-mono);
|
|
}
|
|
</style>
|