From c551fa59a5797e3c434031a1b2176e75845be512 Mon Sep 17 00:00:00 2001 From: NiallJoeMaher Date: Mon, 26 Oct 2026 14:09:25 +0000 Subject: [PATCH] Site: a blog, structured data for search and AI engines, llms.txt, and a footer that groups its links - /blog with four posts in Pluck's voice (Pocket, Omnivore, connecting your AI, what to check before trusting an app), each with its hero image. Five more are drafts: shown in dev, absent from production, the sitemap and llms.txt. - Images still to be made sit in a ```image fence holding the brief for Claude Design; dev shows it, production shows nothing. - JSON-LD: Organization, WebSite and SoftwareApplication on home, FAQPage on Support, BlogPosting on each post. Search keywords live only there, never on the page. - /llms.txt, canonical links on every site page, and the posts in the sitemap. - Footer: the same links on every page in three groups, the current page marked, the tagline under the logo, and a base row with the language and the company. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01Per4f8yL5A7nL9frZVDJj7 --- apps/web/app/(site)/SiteChrome.tsx | 35 ++++-- .../(site)/blog/[slug]/opengraph-image.tsx | 12 ++ apps/web/app/(site)/blog/[slug]/page.tsx | 70 +++++++++++ apps/web/app/(site)/blog/page.tsx | 34 ++++++ apps/web/app/(site)/chrome/page.tsx | 2 +- apps/web/app/(site)/connect/page.tsx | 2 +- apps/web/app/(site)/iphone/page.tsx | 2 +- apps/web/app/(site)/open-source/page.tsx | 2 +- apps/web/app/(site)/page.tsx | 39 +++++- apps/web/app/(site)/privacy/page.tsx | 2 +- apps/web/app/(site)/site.module.css | 56 +++++++-- apps/web/app/(site)/support/page.tsx | 12 +- apps/web/app/(site)/terms/page.tsx | 2 +- apps/web/app/llms.txt/route.ts | 45 +++++++ apps/web/app/sitemap.ts | 8 +- apps/web/components/JsonLd.tsx | 4 + apps/web/content/blog/a-list-is-a-plan.md | 46 +++++++ .../blog/ask-your-ai-what-you-plucked.md | 66 ++++++++++ .../web/content/blog/bring-the-rest-across.md | 49 ++++++++ .../content/blog/forward-the-newsletter.md | 41 +++++++ apps/web/content/blog/markdown.d.ts | 5 + apps/web/content/blog/nothing-is-deleted.md | 44 +++++++ apps/web/content/blog/omnivore-is-gone.md | 50 ++++++++ apps/web/content/blog/pocket-is-gone.md | 53 ++++++++ .../blog/read-it-later-apps-keep-closing.md | 56 +++++++++ apps/web/content/blog/run-your-own-pluck.md | 62 ++++++++++ apps/web/lib/blog.ts | 115 ++++++++++++++++++ apps/web/next.config.ts | 2 + .../ask-your-ai-what-you-plucked/hero.png | Bin 0 -> 54793 bytes .../ask-your-ai-what-you-plucked/marked.png | Bin 0 -> 117771 bytes .../web/public/blog/omnivore-is-gone/hero.png | Bin 0 -> 149734 bytes .../public/blog/pocket-is-gone/archive.png | Bin 0 -> 109229 bytes apps/web/public/blog/pocket-is-gone/hero.png | Bin 0 -> 99230 bytes .../read-it-later-apps-keep-closing/hero.png | Bin 0 -> 139371 bytes e2e/design.spec.ts | 4 +- e2e/site.spec.ts | 37 +++++- packages/i18n/messages/site/de.json | 20 ++- packages/i18n/messages/site/en.json | 20 ++- packages/i18n/messages/site/es.json | 20 ++- packages/i18n/messages/site/fr.json | 20 ++- packages/i18n/messages/site/it.json | 20 ++- packages/i18n/messages/site/ja.json | 20 ++- packages/i18n/messages/site/ko.json | 20 ++- packages/i18n/messages/site/nl.json | 20 ++- packages/i18n/messages/site/pt-BR.json | 20 ++- packages/i18n/messages/site/zh-Hans.json | 20 ++- 46 files changed, 1101 insertions(+), 56 deletions(-) create mode 100644 apps/web/app/(site)/blog/[slug]/opengraph-image.tsx create mode 100644 apps/web/app/(site)/blog/[slug]/page.tsx create mode 100644 apps/web/app/(site)/blog/page.tsx create mode 100644 apps/web/app/llms.txt/route.ts create mode 100644 apps/web/components/JsonLd.tsx create mode 100644 apps/web/content/blog/a-list-is-a-plan.md create mode 100644 apps/web/content/blog/ask-your-ai-what-you-plucked.md create mode 100644 apps/web/content/blog/bring-the-rest-across.md create mode 100644 apps/web/content/blog/forward-the-newsletter.md create mode 100644 apps/web/content/blog/markdown.d.ts create mode 100644 apps/web/content/blog/nothing-is-deleted.md create mode 100644 apps/web/content/blog/omnivore-is-gone.md create mode 100644 apps/web/content/blog/pocket-is-gone.md create mode 100644 apps/web/content/blog/read-it-later-apps-keep-closing.md create mode 100644 apps/web/content/blog/run-your-own-pluck.md create mode 100644 apps/web/lib/blog.ts create mode 100644 apps/web/public/blog/ask-your-ai-what-you-plucked/hero.png create mode 100644 apps/web/public/blog/ask-your-ai-what-you-plucked/marked.png create mode 100644 apps/web/public/blog/omnivore-is-gone/hero.png create mode 100644 apps/web/public/blog/pocket-is-gone/archive.png create mode 100644 apps/web/public/blog/pocket-is-gone/hero.png create mode 100644 apps/web/public/blog/read-it-later-apps-keep-closing/hero.png diff --git a/apps/web/app/(site)/SiteChrome.tsx b/apps/web/app/(site)/SiteChrome.tsx index 84619763..db5685c0 100644 --- a/apps/web/app/(site)/SiteChrome.tsx +++ b/apps/web/app/(site)/SiteChrome.tsx @@ -7,7 +7,7 @@ import { LanguageSelect } from "@/components/LanguageSelect"; import { REPO_URL } from "@/lib/site"; import styles from "./site.module.css"; -type Page = "home" | "chrome" | "iphone" | "connect" | "open-source" | "support" | "privacy" | "terms"; +type Page = "home" | "chrome" | "iphone" | "connect" | "open-source" | "support" | "privacy" | "terms" | "blog"; // Header and footer for the marketing pages (the boards' shared chrome). export async function SitePage({ page, dark = false, footerNote, children }: { page: Page; dark?: boolean; footerNote?: ReactNode; children: ReactNode }) { @@ -27,17 +27,30 @@ export async function SitePage({ page, dark = false, footerNote, children }: { p
{children}
+ {/* The same links on every page, grouped by meaning; the page you're on is marked, not dropped. */}
- {footerNote ? {footerNote} : } - {page !== "home" && {t("footerHome")}} - {page !== "connect" && {t("connect")}} - {page !== "open-source" && {t("openSource")}} - {page === "home" && GitHub} - {page !== "support" && {t("support")}} - {page !== "privacy" && {t("privacy")}} - {page !== "terms" && {t("terms")}} - {t("cookies")} - +
+ +

{footerNote ?? t("tagline")}

+
+
    +
  • {t("connect")}
  • +
  • {t("openSource")}
  • +
  • GitHub
  • +
+
    +
  • {t("blog")}
  • +
  • {t("support")}
  • +
+
    +
  • {t("privacy")}
  • +
  • {t("terms")}
  • +
  • {t("cookies")}
  • +
+
+ + © {new Date().getFullYear()} Codú Limited +
diff --git a/apps/web/app/(site)/blog/[slug]/opengraph-image.tsx b/apps/web/app/(site)/blog/[slug]/opengraph-image.tsx new file mode 100644 index 00000000..4d8494bd --- /dev/null +++ b/apps/web/app/(site)/blog/[slug]/opengraph-image.tsx @@ -0,0 +1,12 @@ +import { findPost } from "@/lib/blog"; +import { og, OG_SIZE } from "@/lib/og"; + +export const size = OG_SIZE; +export const contentType = "image/png"; +export const alt = "A post on the Pluck blog"; + +// A post's link preview: its title and its one-line description, on the forest ground. +export default async function Image({ params }: { params: Promise<{ slug: string }> }) { + const post = findPost((await params).slug); + return og({ title: post?.title ?? "Pluck", sub: post?.description, foot: "getpluck.io/blog" }); +} diff --git a/apps/web/app/(site)/blog/[slug]/page.tsx b/apps/web/app/(site)/blog/[slug]/page.tsx new file mode 100644 index 00000000..2fed7755 --- /dev/null +++ b/apps/web/app/(site)/blog/[slug]/page.tsx @@ -0,0 +1,70 @@ +import { fromIntlLocale } from "@pluck/i18n"; +import type { Metadata } from "next"; +import { getFormatter, getLocale, getTranslations } from "next-intl/server"; +import Link from "next/link"; +import { notFound } from "next/navigation"; +import { JsonLd } from "@/components/JsonLd"; +import { findPost, POSTS, postBody } from "@/lib/blog"; +import { SitePage } from "../../SiteChrome"; +import styles from "../../site.module.css"; + +type Params = { params: Promise<{ slug: string }> }; + +export const dynamicParams = false; +export const generateStaticParams = () => POSTS.map((p) => ({ slug: p.slug })); + +export async function generateMetadata({ params }: Params): Promise { + const post = findPost((await params).slug); + if (!post) return {}; + return { + title: `${post.title} · Pluck`, + description: post.description, + alternates: { canonical: `/blog/${post.slug}` }, + openGraph: { type: "article", title: post.title, description: post.description, publishedTime: post.date }, + }; +} + +const base = process.env.BETTER_AUTH_URL ?? "http://localhost:3000"; + +// One post: the reader's type (Source Serif at the reader's sizes) under the site's chrome. Posts are in English. +export default async function BlogPost({ params }: Params) { + const post = findPost((await params).slug); + if (!post) notFound(); + const { html, minutes } = postBody(post); + const [t, format, locale] = await Promise.all([getTranslations("site.blog"), getFormatter(), getLocale()]); + const url = `${base}/blog/${post.slug}`; + return ( + + +
+
+ {t("all")} +

{post.title.replace(/\.$/, "")}{post.title.endsWith(".") && .}

+ {format.dateTime(new Date(post.date), { dateStyle: "long" })} · {t("minutes", { minutes })}{post.draft && · Draft} + {fromIntlLocale(locale) !== "en" &&

{t("englishOnly")}

} +
+
+
+ {t("box.title")} + {t.rich("box.body", { link: (c) => {c} })} +
+
+
+ ); +} diff --git a/apps/web/app/(site)/blog/page.tsx b/apps/web/app/(site)/blog/page.tsx new file mode 100644 index 00000000..398de018 --- /dev/null +++ b/apps/web/app/(site)/blog/page.tsx @@ -0,0 +1,34 @@ +import type { Metadata } from "next"; +import { getFormatter, getTranslations } from "next-intl/server"; +import Link from "next/link"; +import { POSTS } from "@/lib/blog"; +import { SitePage } from "../SiteChrome"; +import styles from "../site.module.css"; + +export async function generateMetadata(): Promise { + const t = await getTranslations("site.blog.meta"); + return { title: t("title"), description: t("description"), alternates: { canonical: "/blog" } }; +} + +// The posts, newest first, in the legal pages' shape: a title, a lede, then one ruled section each. +export default async function Blog() { + const t = await getTranslations("site"); + const format = await getFormatter(); + return ( + +
+
+

{t.rich("blog.title", { dot: (c) => {c} })}

+

{t("blog.lede")}

+
+ {POSTS.map((p) => ( +
+ {format.dateTime(new Date(p.date), { dateStyle: "long" })}{p.draft && · Draft} +

{p.title}

+

{p.description}

+
+ ))} +
+
+ ); +} diff --git a/apps/web/app/(site)/chrome/page.tsx b/apps/web/app/(site)/chrome/page.tsx index dea6e5ee..1e1021af 100644 --- a/apps/web/app/(site)/chrome/page.tsx +++ b/apps/web/app/(site)/chrome/page.tsx @@ -6,7 +6,7 @@ import styles from "../site.module.css"; export async function generateMetadata(): Promise { const t = await getTranslations("site.soon.chrome.meta"); - return { title: t("title"), description: t("description") }; + return { title: t("title"), description: t("description"), alternates: { canonical: "/chrome" } }; } // Where "Add to Chrome" lands until the store listing is live (CHROME_STORE_URL in lib/site.ts). diff --git a/apps/web/app/(site)/connect/page.tsx b/apps/web/app/(site)/connect/page.tsx index a16c0d14..2a7cc045 100644 --- a/apps/web/app/(site)/connect/page.tsx +++ b/apps/web/app/(site)/connect/page.tsx @@ -13,7 +13,7 @@ export const dynamic = "force-dynamic"; export async function generateMetadata(): Promise { const t = await getTranslations("site.connect.meta"); - return { title: t("title"), description: t("description") }; + return { title: t("title"), description: t("description"), alternates: { canonical: "/connect" } }; } // Product names stay as they are; the steps and notes are under site.connect.tools.. diff --git a/apps/web/app/(site)/iphone/page.tsx b/apps/web/app/(site)/iphone/page.tsx index 5a1c6071..a8ae8e10 100644 --- a/apps/web/app/(site)/iphone/page.tsx +++ b/apps/web/app/(site)/iphone/page.tsx @@ -6,7 +6,7 @@ import styles from "../site.module.css"; export async function generateMetadata(): Promise { const t = await getTranslations("site.iphone.meta"); - return { title: t("title"), description: t("description") }; + return { title: t("title"), description: t("description"), alternates: { canonical: "/iphone" } }; } const STEPS = ["get", "join", "signIn", "share"] as const; diff --git a/apps/web/app/(site)/open-source/page.tsx b/apps/web/app/(site)/open-source/page.tsx index f8eade7a..3ddd80b1 100644 --- a/apps/web/app/(site)/open-source/page.tsx +++ b/apps/web/app/(site)/open-source/page.tsx @@ -7,7 +7,7 @@ import styles from "../site.module.css"; export async function generateMetadata(): Promise { const t = await getTranslations("site.openSource.meta"); - return { title: t("title"), description: t("description") }; + return { title: t("title"), description: t("description"), alternates: { canonical: "/open-source" } }; } const REASONS = ["export", "page", "public", "ai"] as const; diff --git a/apps/web/app/(site)/page.tsx b/apps/web/app/(site)/page.tsx index 1caa3fad..04d01619 100644 --- a/apps/web/app/(site)/page.tsx +++ b/apps/web/app/(site)/page.tsx @@ -2,7 +2,8 @@ import type { Metadata } from "next"; import { getTranslations } from "next-intl/server"; import Link from "next/link"; import type { ReactNode } from "react"; -import { APP_STORE_URL, CHROME_STORE_URL } from "@/lib/site"; +import { JsonLd } from "@/components/JsonLd"; +import { APP_STORE_URL, CHROME_STORE_URL, REPO_URL } from "@/lib/site"; import { PasteBox } from "./PasteBox"; import { Reveal } from "./Reveal"; import { SitePage } from "./SiteChrome"; @@ -10,9 +11,42 @@ import styles from "./site.module.css"; export async function generateMetadata(): Promise { const t = await getTranslations("site.home.meta"); - return { title: t("title"), description: t("description") }; + return { title: t("title"), description: t("description"), alternates: { canonical: "/" } }; } +const base = process.env.BETTER_AUTH_URL ?? "http://localhost:3000"; + +// Who and what Pluck is, for search engines and AI answer engines. Facts only: each one is on the page or in the repo. +const structured = (description: string) => ({ + "@context": "https://schema.org", + "@graph": [ + { "@type": "Organization", "@id": `${base}/#org`, name: "Pluck", legalName: "Codú Limited", url: base, logo: `${base}/icon-512.png`, sameAs: [REPO_URL] }, + { "@type": "WebSite", "@id": `${base}/#site`, name: "Pluck", url: base, publisher: { "@id": `${base}/#org` } }, + { + "@type": "SoftwareApplication", + name: "Pluck", + url: base, + description, + applicationCategory: "UtilitiesApplication", + operatingSystem: "Web, iOS, Chrome", + isAccessibleForFree: true, + offers: { "@type": "Offer", price: "0", priceCurrency: "EUR" }, + license: "https://www.gnu.org/licenses/agpl-3.0.html", + sameAs: [REPO_URL], + publisher: { "@id": `${base}/#org` }, + featureList: [ + "Pluck links, notes, todos, PDFs and images from the iPhone share sheet, Chrome, email or an AI tool", + "Keeps the page text, not just the link", + "Lists with a note and a tick per item, private or public", + "MCP connector for Claude, ChatGPT, Cursor and any AI tool that speaks MCP", + "Imports from Pocket, Omnivore, Raindrop and browser bookmark files", + "Export everything as JSON and Markdown", + "Self-host with Docker", + ], + }, + ], +}); + // The app, drawn for the hero (the Landing board's rows). const ROWS = [ { key: "mcp", ini: "MC", tile: "var(--tile-0)", on: false }, @@ -44,6 +78,7 @@ export default async function Home() { const dot = (c: ReactNode) => {c}; return ( +

{t.rich("hero.title", { dot })}

diff --git a/apps/web/app/(site)/privacy/page.tsx b/apps/web/app/(site)/privacy/page.tsx index 91fee168..0bb8b3f6 100644 --- a/apps/web/app/(site)/privacy/page.tsx +++ b/apps/web/app/(site)/privacy/page.tsx @@ -4,7 +4,7 @@ import { LegalPage } from "../LegalPage"; export async function generateMetadata(): Promise { const t = await getTranslations("site.privacy.meta"); - return { title: t("title"), description: t("description") }; + return { title: t("title"), description: t("description"), alternates: { canonical: "/privacy" } }; } // Each section's heading and paragraph, by key under site.privacy.sections. diff --git a/apps/web/app/(site)/site.module.css b/apps/web/app/(site)/site.module.css index ad4f0fbf..ef6a49cc 100644 --- a/apps/web/app/(site)/site.module.css +++ b/apps/web/app/(site)/site.module.css @@ -49,18 +49,31 @@ .dark .cta { background: var(--highlight); } .site.dark .cta, .site.dark .cta:hover { color: #151A13; } .footer { margin-top: auto; border-top: 1px solid var(--line); } -.footerInner { max-width: 1240px; margin: 0 auto; padding: 28px 24px 40px; display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; font-size: 14px; color: var(--ink2); } -.footerInner a, .site .footerInner a { color: var(--ink2); } -.footerButton { padding: 0; border: 0; background: none; font: inherit; color: var(--ink2); text-decoration: underline; cursor: pointer; } -.footerButton:hover { color: var(--ink); } -.footerLanguage { display: inline-flex; align-items: center; gap: 6px; } -.footerLanguage select { appearance: none; height: 32px; padding: 0 28px 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; font: inherit; color: var(--ink); cursor: pointer; - background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23525A4E' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center; } +/* The brand on the left, three quiet groups of links, then a base row: language and who runs it. */ +.footerInner { max-width: 1240px; margin: 0 auto; padding: 56px 24px 32px; display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, auto); gap: 48px 72px; font-size: 15px; line-height: 24px; color: var(--ink2); } +.footerBrand p { margin: 12px 0 0; max-width: 28ch; } +.footerLinks { margin: -6px 0; padding: 0; list-style: none; display: flex; flex-direction: column; } +.footerLinks li:empty { display: none; } /* Cookies only shows when analytics is on */ +.footerLinks a, .footerButton { display: inline-block; padding: 6px 0; text-decoration: none; transition: color 160ms cubic-bezier(0.16, 1, 0.3, 1); } +.site .footerLinks a, .footerButton { color: var(--ink2); } +.site .footerLinks a:hover, .footerButton:hover { color: var(--ink); } +.site .footerLinks a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 5px; } +.dark .footerLinks a[aria-current="page"] { text-decoration: none; color: var(--highlight); } +.footerButton { border: 0; background: none; font: inherit; cursor: pointer; } +.footerBase { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; } +.footerLanguage { display: inline-flex; align-items: center; gap: 8px; } +.footerLanguage select { appearance: none; height: 36px; padding: 0 30px 0 12px; border: 1px solid var(--line-strong); border-radius: 8px; font: inherit; color: var(--ink); cursor: pointer; + background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23525A4E' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center; } .dark .footerLanguage select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23A0A898' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); } .footerLanguage select:hover { border-color: var(--ink2); } -.footerBrand { margin-right: auto; display: inline-flex; align-items: center; } -.footerNote { margin-right: auto; } -@media (max-width: 600px) { .footerBrand, .footerNote { flex-basis: 100%; margin-bottom: 4px; } } +/* On a phone the brand takes the top, the groups pair up, and each link is a full-size tap target. */ +@media (max-width: 720px) { + .footerInner { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; padding: 40px 20px 28px; } + .footerBrand, .footerLinks:last-of-type { grid-column: 1 / -1; } + .footerLinks { margin: -10px 0; } + .footerLinks:last-of-type { flex-direction: row; flex-wrap: wrap; column-gap: 24px; } /* the legal links read as one line of small print */ + .footerLinks a, .footerButton { padding: 10px 0; } +} /* Buttons */ .big { display: inline-flex; align-items: center; height: 56px; padding: 0 24px; border-radius: 12px; text-decoration: none; font-weight: 600; } @@ -311,6 +324,29 @@ .legalSection p, .legalBox span { margin: 0; max-width: 52ch; } /* Geist's "0" is wide: 52ch holds about 75 letters */ .legalBox { display: flex; flex-direction: column; gap: 10px; padding: 20px 24px; border-radius: 12px; background: var(--rail); } .legalBox b { font-weight: 600; } + +/* The blog: the legal pages' frame, with the item reader's type (reader.module.css) for the body. */ +.postTitle { margin: 0; font-size: clamp(36px, 5vw, 56px); line-height: 1.05; } +.postDate { font-size: 14px; line-height: 20px; color: var(--ink2); } +.postBack { align-self: flex-start; font-size: 14px; font-weight: 600; } +.legalSection h2 a { text-decoration: none; } +.legalSection h2 a:hover { text-decoration: underline; text-underline-offset: 3px; } +.postBody { font-family: var(--font-reader); font-size: 18px; line-height: 29px; overflow-wrap: anywhere; } +.postBody > :first-child { margin-top: 0; } +.postBody p, .postBody ul, .postBody ol, .postBody blockquote, .postBody pre { margin: 0 0 20px; max-width: 62ch; } +.postBody li { text-wrap: pretty; } +.postBody li + li { margin-top: 6px; } +.postBody h2 { font-family: var(--font-ui); font-size: 24px; line-height: 30px; font-weight: 600; letter-spacing: -0.02em; margin: 40px 0 12px; } +.postBody pre { font: 14px/1.5 var(--font-geist-mono), ui-monospace, "SF Mono", Menlo, monospace; background: var(--rail); padding: 12px 16px; border-radius: 8px; overflow-x: auto; } +.postBody code { font-family: var(--font-geist-mono), ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.85em; } +.postBody a { text-underline-offset: 2px; } +.postBody img { display: block; width: 100%; height: auto; aspect-ratio: auto 16 / 9; border-radius: 12px; } /* the blog's images are 1600 × 900; the ratio holds their room while they load */ +.postBody p:has(> img:only-child) { max-width: none; margin: 32px 0; } +/* Dev only: where an image will go, with its brief for Claude Design (lib/blog.ts). */ +.postBody :global(.imageTodo) { margin: 32px 0; padding: 20px; border: 1px dashed var(--line-strong); border-radius: 12px; background: var(--rail); font: 14px/22px var(--font-ui); } +.postBody :global(.imageTodo) figcaption { margin-bottom: 12px; font-weight: 600; } +.postBody :global(.imageTodo) pre { margin: 0; padding: 0; max-width: none; background: none; font: inherit; white-space: pre-wrap; user-select: all; } +.postDraft { color: var(--clay); font-weight: 600; } .visuallyHidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } /* Motion. One sequence on arrival (the title lands, the row is plucked and stamped), then each drawn piece plays diff --git a/apps/web/app/(site)/support/page.tsx b/apps/web/app/(site)/support/page.tsx index 473d2166..1b42f59b 100644 --- a/apps/web/app/(site)/support/page.tsx +++ b/apps/web/app/(site)/support/page.tsx @@ -2,13 +2,14 @@ import type { Metadata } from "next"; import { getTranslations } from "next-intl/server"; import Link from "next/link"; import type { ReactNode } from "react"; +import { JsonLd } from "@/components/JsonLd"; import { REPO_URL } from "@/lib/site"; import { SitePage } from "../SiteChrome"; import styles from "../site.module.css"; export async function generateMetadata(): Promise { const t = await getTranslations("site.support.meta"); - return { title: t("title"), description: t("description") }; + return { title: t("title"), description: t("description"), alternates: { canonical: "/support" } }; } // Each topic's answers, by key under site.support.. @@ -28,10 +29,19 @@ const RICH = { openSource: (c: ReactNode) => {c}, }; +// The same markup as plain text, for the FAQ structured data. +const PLAIN = { pluckKeys: () => "Alt Shift P", highlightKeys: () => "Alt Shift H", connect: (c: string) => c, openSource: (c: string) => c }; + export default async function Support() { const t = await getTranslations("site.support"); + const faq = { + "@context": "https://schema.org", + "@type": "FAQPage", + mainEntity: TOPICS.flatMap((x) => x.answers.map((a) => ({ "@type": "Question", name: t(`${a}.q`), acceptedAnswer: { "@type": "Answer", text: t.markup(`${a}.a`, PLAIN) } }))), + }; return ( +

{t.rich("title", { dot: (c) => {c} })}

{t.rich("lede", { bugs: (c) => {c} })}

diff --git a/apps/web/app/(site)/terms/page.tsx b/apps/web/app/(site)/terms/page.tsx index 09094bb8..01ad2eb7 100644 --- a/apps/web/app/(site)/terms/page.tsx +++ b/apps/web/app/(site)/terms/page.tsx @@ -5,7 +5,7 @@ import { LegalPage } from "../LegalPage"; export async function generateMetadata(): Promise { const t = await getTranslations("site.terms.meta"); - return { title: t("title"), description: t("description") }; + return { title: t("title"), description: t("description"), alternates: { canonical: "/terms" } }; } // Each section's heading and paragraph, by key under site.terms.sections. diff --git a/apps/web/app/llms.txt/route.ts b/apps/web/app/llms.txt/route.ts new file mode 100644 index 00000000..93eb6b48 --- /dev/null +++ b/apps/web/app/llms.txt/route.ts @@ -0,0 +1,45 @@ +import { POSTS } from "@/lib/blog"; +import { CONNECTOR_URL, LICENCE, REPO_URL } from "@/lib/site"; + +const base = process.env.BETTER_AUTH_URL ?? "http://localhost:3000"; + +// llms.txt (llmstxt.org): what Pluck is, in plain Markdown, for AI tools that answer questions about it. +export function GET() { + const body = `# Pluck + +> Pluck is a free, open-source read-it-later app. Pluck a link, a note, a todo, a PDF or an image in one tap from the iPhone share sheet, Chrome, email or your AI tool, and sort it later, by hand or with your AI. Pluck keeps the page, not just the link. + +Key facts: + +- Free to use at ${base}. Open source (${LICENCE}). Self-host with Docker in one command. +- No AI runs inside Pluck. Your own AI tool (Claude, ChatGPT, Cursor or any MCP client) connects through Pluck's MCP connector at ${CONNECTOR_URL} and reads, searches and sorts your library when you ask. +- Your AI cannot delete anything or make a list public. Everything it adds is marked "by AI". +- Kinds of item: Read, Watch, PDF, Image, Note, Todo, Thing. Status: Inbox, Later, Archived, Done. +- Items you never touch move to the Archive after 30 days (you pick the number, or turn it off). Nothing is deleted. +- Lists: ordered, with a note and a tick per item. Private by default, public at /@handle/slug with one switch. +- Imports from Pocket (CSV), Omnivore (export zip), Raindrop (CSV) and any browser's bookmarks HTML. Export everything as JSON and Markdown. +- Made by Codú Limited, Ireland. + +## Pages + +- [Home](${base}/): what Pluck does +- [Connect your AI](${base}/connect): set up Claude, Claude Code, ChatGPT, Cursor or a self-hosted bridge, and the tools your AI gets +- [Open source](${base}/open-source): self-hosting, export and what Pluck does with your data +- [Support](${base}/support): answers about the extension, iPhone, your AI and your account +- [iPhone](${base}/iphone): the iPhone app +- [Chrome](${base}/chrome): the Chrome extension + +## Blog + +${POSTS.map((p) => `- [${p.title}](${base}/blog/${p.slug}): ${p.description}`).join("\n")} + +## Optional + +- [Source code](${REPO_URL}) +- [MCP tools and prompts](${REPO_URL}/blob/main/docs/mcp.md) +- [Self-host guide](${REPO_URL}/blob/main/docs/self-host.md) +- [Privacy](${base}/privacy) +- [Terms](${base}/terms) +`; + return new Response(body, { headers: { "content-type": "text/markdown; charset=utf-8" } }); +} diff --git a/apps/web/app/sitemap.ts b/apps/web/app/sitemap.ts index fdce4471..18ed43a9 100644 --- a/apps/web/app/sitemap.ts +++ b/apps/web/app/sitemap.ts @@ -1,8 +1,12 @@ import type { MetadataRoute } from "next"; +import { POSTS } from "@/lib/blog"; const base = process.env.BETTER_AUTH_URL ?? "http://localhost:3000"; -// The marketing pages. Public Lists are left to links: they are people's pages, not ours to list. +// The marketing pages and the blog. Public Lists are left to links: they are people's pages, not ours to list. export default function sitemap(): MetadataRoute.Sitemap { - return ["", "/connect", "/open-source", "/iphone", "/chrome", "/support", "/privacy", "/terms"].map((path) => ({ url: `${base}${path}` })); + return [ + ...["", "/connect", "/open-source", "/iphone", "/chrome", "/support", "/privacy", "/terms", "/blog"].map((path) => ({ url: `${base}${path}` })), + ...POSTS.map((p) => ({ url: `${base}/blog/${p.slug}`, lastModified: p.date })), + ]; } diff --git a/apps/web/components/JsonLd.tsx b/apps/web/components/JsonLd.tsx new file mode 100644 index 00000000..2a37fd51 --- /dev/null +++ b/apps/web/components/JsonLd.tsx @@ -0,0 +1,4 @@ +// Structured data for search engines and AI answer engines. "<" is escaped so page text can't close the script tag. +export function JsonLd({ data }: { data: object }) { + return