diff --git a/CHANGELOG.md b/CHANGELOG.md index 5dd7766..51ab3a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## July 2026 +- Tag pages now include finds: `/tags//` is generated from the union of entry and find tags (1,179 tags that existed only on finds — most tag links on find pages — previously 404'd) and lists tagged finds in a compact secondary section below the entry grid, keeping reviews/bundles/posts visually on top. Find-only tag pages with fewer than 3 finds are noindexed until they fill out; tag feeds stay entries-only, and the RSS pill only renders where a feed exists. Category pages are unaffected (finds have no category) - Feeds for everything: alongside the existing `/rss.xml`, add a JSON Feed 1.1 at `/feed.json`, per-category RSS at `/categories//rss.xml`, and per-tag RSS at `/tags//rss.xml` — all derived from a shared `src/lib/feed.ts` item source (reviews + posts + bundles, same visibility rules as the site). Category/tag pages advertise their scoped feed via `` autodiscovery and show a visible RSS pill in the subheader (browsers dropped feed-detection UI years ago, so autodiscovery alone is invisible); a new `/feeds/` directory page (linked from the footer) lists every feed with entry counts; every RSS feed carries an `atom:link` self reference and renders as a readable page in browsers via `public/feed.xsl` - Programmatic-reader pass: build-generated `/llms.txt` (llmstxt.org format — site description, feed/endpoint map, and every review, bundle, and post with one-line descriptions), `SearchAction` on the home-page `WebSite` JSON-LD wired to `/search/?q=`, and a "For robots" section on `/feeds/` documenting `search.json`, `llms.txt`, the sitemap, and JSON-LD coverage - Autonomous pipeline overhaul: new `/daily-pipeline` skill chains capture → bundle → review graduation → pick-of-the-day → build → commit → push and ends with a digest; `daily-finds` gains a score-and-shortlist stage (up to 12 `shortlist: true` finds per run, top 1-3 flagged as review candidates), feed-first fetching (`fetch: "feed"` + `feedUrl` in sources.json), cadence-aware scanning, and authority to apply mechanical source maintenance itself; `build-bundle`/`cluster-bundles`/`build-review` gain unattended `auto` modes (publish + log instead of pausing for confirmation), and `build-bundle weekly` writes a date-based "week's catch" so shortlisted finds never sit unbundled for weeks diff --git a/CLAUDE.md b/CLAUDE.md index 95b54ca..28ac86f 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -17,7 +17,7 @@ Unattended runs never pause for confirmation — they publish, log to `daily-fin - Review heroes are auto-discovered from `src/content/reviews//hero.` (`src/lib/hero.ts` glob) — name the file `hero.*`; no registration. - The homepage "pick of the day" is `src/data/pick.json` (`{"hero": ""}`); falls back to the latest review. - Find slugs are globally unique although folders are date-bucketed; URLs stay flat at `/find//`. -- Finds are only reachable through bundles — an unbundled find is invisible on the site. +- Finds are reachable through bundles and through tag pages (a secondary "Finds" list under the entry grid on `/tags//`) — an unbundled find is still invisible on the home feed, grids, and category pages. - `source` frontmatter must exactly match a `name` in `sources.json`. - Amazon links: store canonical `https://www.amazon.com/dp/` with no query params; `src/lib/affiliate.ts` adds the tracking ID, badge, and disclosure at render time. - Commit style: see `git log` — `content: …` for capture runs, `site: …` for everything user-visible; one commit per pipeline stage. diff --git a/README.md b/README.md index 5848511..146df3a 100644 --- a/README.md +++ b/README.md @@ -10,14 +10,14 @@ Built with [Astro](https://astro.build) + MDX. - **Autonomous daily pipeline** under `.claude/skills/`: `daily-pipeline` (the unattended chain: capture → bundle → review graduation → pick of the day → build → commit → push → digest); `daily-finds` (sweeps every source in `sources.json`, writes one find file per qualifying item, marks a ranked shortlist of up to 12, adds Amazon links for matched physical products, and self-maintains `sources.json`); `build-bundle` (thematic bundle from the find pool; `auto` and `weekly` catch modes); `cluster-bundles` (batch-clusters the find pool into multiple bundles); `build-review` (graduates a find to a full review with a mandatory fact-check in auto mode, linking the two via `fromFind` / `promotedTo`) - **Pick of the day** driven by `src/data/pick.json` (falls back to the latest review) — the homepage hero is a one-line content edit, also settable from the dev-mode button on any review page - **Sources catalog** at `sources.json` with per-source fetch strategy (`feed` / `webfetch` / `curl` / `skip`, feeds preferred) and the `/sources` page rendering a 3-column card stream with a "Recent finds" sub-list per card -- **Strict find visibility**: find items are reachable only via the bundles that reference them, the `/sources` cross-reference, or direct URL — they don't crowd the home feed, tag pages, or category pages +- **Strict find visibility**: find items are reachable via the bundles that reference them, the `/sources` cross-reference, tag pages (a secondary "Finds" list below the entry grid), or direct URL — they don't crowd the home feed, grids, or category pages - **Backlinks** computed at build time: each find page lists every bundle that references it; promoted finds show a forward link to the review; reviews show a "← First surfaced…" backlink to their originating find - **Newspaper-style masthead** on every page: live entry-count + last-updated stats on the left, large serif "Unique" wordmark centered between thin rules, About/Blog nav on the right; per-page italic subheader ("A small log of delightful things.") with last-updated date on listing pages - **Pinterest-style home page**: hero card for the latest review plus a 3-column masonry grid of remaining reviews with a "Load more" reveal; old plain-list home preserved at `/index3/` - **Unified chronological feed** at `/index3/` across reviews + bundles + posts - **SEO-friendly site footer** with Browse / Collections (live counts) / About link columns and a centered legal line; consistent 76rem page width across the entire site (article prose constrained to a comfortable reading measure inside the wider layout) - Reviews render as two-line index entries: bold name + muted subtitle (`Cotypist` / *Autocomplete that lives everywhere on your Mac*) -- Auto-generated `/categories//` and `/tags//` listing pages — finds excluded by design +- Auto-generated `/categories//` and `/tags//` listing pages; tag pages are built from the union of entry and find tags (so every tag linked from a find resolves) and list tagged finds in a secondary section — find-only tag pages with fewer than 3 finds are noindexed until they accumulate content; category pages stay entries-only (finds have no category) - **Amazon affiliate handling** in `src/lib/affiliate.ts`: outbound links to Amazon (`amazon.com`, `amzn.to`, `a.co`, `smile.amazon.com`) get the configured tracking ID appended automatically; the link gets `rel="sponsored"`, an "Affiliate" badge appears next to it, and a one-line disclosure is shown beneath. Finds and reviews also take an optional `amazonLink` frontmatter field (canonical `/dp/` form) rendered as an "Also on Amazon" link — the capture pipeline populates it when a shortlisted physical product has an exact Amazon match. Add additional marketplace IDs (e.g. `amazon.co.uk`) to the `AMAZON_TAGS` map when needed - **SEO surface**: single `` component owning canonical, Open Graph, Twitter Card, feed autodiscovery, and JSON-LD; per-page structured data (`Review`, `BlogPosting`, `Product`, `Article`, `CollectionPage`, `ItemList`, `BreadcrumbList`, `WebSite` with `SearchAction`, `Organization`); auto-generated `sitemap-index.xml` (excludes `/grid/` and `/index3/`); `robots.txt`; static OG image fallbacks under `/public/og/`; promoted finds canonical to their review - **Feeds everywhere**: site-wide RSS 2.0 at `/rss.xml` and JSON Feed 1.1 at `/feed.json`, plus per-category (`/categories//rss.xml`) and per-tag (`/tags//rss.xml`) RSS feeds, all derived from a single item source in `src/lib/feed.ts`; category/tag pages advertise their scoped feed via `` and show a visible RSS pill in the subheader; a human-readable directory at `/feeds/` (footer-linked) lists every feed with counts; RSS renders as a readable page in browsers via `public/feed.xsl` diff --git a/astro.config.mjs b/astro.config.mjs index f75c442..dce08a6 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -136,7 +136,7 @@ const feedSlashShim = { name: 'feed-trailing-slash-dev-shim', apply: 'serve', configureServer(server) { - server.middlewares.use((req, res, next) => { + server.middlewares.use((req, _res, next) => { if (/^\/(tags|categories)\/[^/]+\/rss\.xml$/.test(req.url)) req.url += '/'; next(); }); diff --git a/src/components/EntryList.astro b/src/components/EntryList.astro index 8c61eea..f58e6f0 100644 --- a/src/components/EntryList.astro +++ b/src/components/EntryList.astro @@ -1,8 +1,13 @@ --- -import type { Entry } from '../lib/entries'; - +// Structural subset of lib/entries' Entry so callers can also feed mapped +// find items (tag pages) without pretending they're full entries. interface Props { - entries: Entry[]; + entries: Array<{ + href: string; + date: Date; + primary: string; + secondary?: string; + }>; } const { entries } = Astro.props; diff --git a/src/pages/feeds.astro b/src/pages/feeds.astro index d4287d1..f8e5db6 100644 --- a/src/pages/feeds.astro +++ b/src/pages/feeds.astro @@ -31,6 +31,7 @@ const breadcrumbs = buildBreadcrumbs([ title="Feeds" description={description} subheader="Take Unique with you." + ogImage={ogImage} jsonLd={[collectionPage, breadcrumbs]} >

Feeds

diff --git a/src/pages/tags/[tag].astro b/src/pages/tags/[tag].astro index f86dce8..bdb1f84 100644 --- a/src/pages/tags/[tag].astro +++ b/src/pages/tags/[tag].astro @@ -1,7 +1,9 @@ --- import BaseLayout from '../../layouts/BaseLayout.astro'; import EntryGrid from '../../components/EntryGrid.astro'; +import EntryList from '../../components/EntryList.astro'; import { getAllEntries } from '../../lib/entries'; +import { getAllFinds } from '../../lib/find-items'; import { buildOgImage, buildBreadcrumbs, @@ -11,29 +13,58 @@ import { export async function getStaticPaths() { const entries = await getAllEntries(); - const tags = [...new Set(entries.flatMap((e) => e.tags))]; - return tags.map((tag) => ({ + const finds = await getAllFinds(); + const tags = new Set([ + ...entries.flatMap((e) => e.tags), + ...finds.flatMap((f) => f.data.tags), + ]); + return [...tags].map((tag) => ({ params: { tag }, props: { tag, entries: entries.filter((e) => e.tags.includes(tag)), + finds: finds.filter((f) => f.data.tags.includes(tag)), }, })); } -const { tag, entries } = Astro.props; -const lastUpdated = entries[0]?.date; -const count = entries.length; -const topNames = entries.slice(0, 3).map((e) => e.primary).join(', '); +const { tag, entries, finds } = Astro.props; + +const findRows = finds.map((f) => ({ + href: `/find/${f.id}/`, + date: f.data.date, + primary: f.data.name, + secondary: f.data.subtitle ?? f.data.description, +})); + +const count = entries.length + finds.length; +const lastUpdated = [entries[0]?.date, finds[0]?.data.date] + .filter((d): d is Date => Boolean(d)) + .sort((a, b) => b.valueOf() - a.valueOf())[0]; + +const topNames = [...entries.map((e) => e.primary), ...finds.map((f) => f.data.name)] + .slice(0, 3) + .join(', '); const description = topNames.length > 0 ? `All ${count} entries tagged #${tag}: ${topNames}${count > 3 ? '…' : '.'}` : `All entries tagged #${tag}.`; +// Find-only tags with a couple of items are thin; keep them browsable but +// out of the index until they accumulate content. +const noindex = entries.length === 0 && finds.length < 3; + +// A scoped feed only exists when the tag has entries (feeds mirror the +// editorial surface: reviews + posts + bundles). +const feedHref = entries.length > 0 ? `/tags/${tag}/rss.xml` : undefined; + const ogImage = buildOgImage(undefined, 'site', `#${tag} on Unique`); const itemList = buildItemList( - entries.map((e) => ({ url: e.href, name: e.primary })), + [ + ...entries.map((e) => ({ url: e.href, name: e.primary })), + ...finds.map((f) => ({ url: `/find/${f.id}/`, name: f.data.name })), + ], `#${tag} on Unique` ); @@ -59,15 +90,34 @@ const breadcrumbs = buildBreadcrumbs([ subheader={`Tagged: ${tag}.`} lastUpdated={lastUpdated} ogImage={ogImage} + noindex={noindex} jsonLd={[collectionPage, itemList, breadcrumbs]} - feeds={[{ title: `Unique — #${tag} (RSS)`, href: `/tags/${tag}/rss.xml` }]} - feedHref={`/tags/${tag}/rss.xml`} + feeds={feedHref ? [{ title: `Unique — #${tag} (RSS)`, href: feedHref }] : undefined} + feedHref={feedHref} wide > - + {entries.length > 0 && } + + {finds.length > 0 && ( +
+

Finds

+ +
+ )} +

← back