site: visible RSS pill on category and tag pages

Autodiscovery alone is invisible since browsers dropped feed-detection
UI — add a small RSS pill in the subheader (new feedHref prop on
BaseLayout) linking to the page's scoped feed.

Claude-Session: https://claude.ai/code/session_01WZaczDJjL3xZ3u5spsN5AL
This commit is contained in:
2026-07-12 18:41:20 -04:00
parent 86ea4c8873
commit 1aa1216a9d
5 changed files with 29 additions and 2 deletions
+25
View File
@@ -22,6 +22,8 @@ interface Props {
jsonLd?: Record<string, unknown> | Record<string, unknown>[];
/** Page-scoped feeds (category/tag) advertised alongside the site-wide ones. */
feeds?: Array<{ title: string; href: string }>;
/** Visible RSS pill in the subheader pointing at this page's scoped feed. */
feedHref?: string;
/** Opt into the wider content tier on roomy viewports (grid/listing pages). */
wide?: boolean;
}
@@ -43,6 +45,7 @@ const {
articleTags,
jsonLd,
feeds,
feedHref,
wide,
} = Astro.props;
const siteName = 'Unique';
@@ -113,6 +116,11 @@ const year = new Date().getFullYear();
Updated <time datetime={updatedDate.toISOString()}>{fmtLong.format(updatedDate)}</time>
</p>
)}
{feedHref && (
<p class="subheader-feed">
<a href={feedHref}>RSS</a>
</p>
)}
</div>
)}
</header>
@@ -305,6 +313,23 @@ const year = new Date().getFullYear();
letter-spacing: 0.08em;
color: var(--muted);
}
.subheader-feed { margin: 0.45rem 0 0; }
.subheader-feed a {
display: inline-block;
padding: 0.05rem 0.5rem;
font-family: ui-sans-serif, system-ui, -apple-system, 'Helvetica Neue', sans-serif;
font-size: 0.66rem;
font-weight: 600;
letter-spacing: 0.04em;
text-transform: uppercase;
background: var(--rule);
color: var(--muted);
border-radius: 999px;
}
.subheader-feed a:hover {
color: var(--accent);
text-decoration: none;
}
@media (max-width: 640px) {
.masthead-row {