GuideOpen

Building a Blog: Technical & SEO Requirements

Universal technical specification for adding a blog to a Next.js + Sanity website. Opinionated, concise, decision-ready. Suitable for a corporate blog with organic-search-first traffic and optional AI authoring with human review.

Building a Blog: Technical & SEO Requirements

Universal technical specification for adding a blog to a Next.js + Sanity website. Opinionated, concise, decision-ready. Suitable for a corporate blog with organic-search-first traffic and optional AI authoring with human review.

How to use this document. Walk §0 with the user first. The answers populate §1 (Project Profile). §2–§20 are the universal spec — they read from §1 and never need editing per project. §21 is the pass/fail checklist. Appendices A and B record deferred decisions and deliberate non-features.

Treat library specifics as guidance, not gospel. This spec was audited against a fixed point in time. Next.js, Sanity, next-intl, @sanity/image-url, @portabletext/react, and the Gemini image API all ship breaking changes faster than this file is updated. Before implementing each section that touches one of those libraries, pull the latest docs (via context7 if available, otherwise WebFetch on the official docs site) and let upstream win on conflicts. Specifically re-verify:

  • §3, §6 — Sanity schema syntax, defineType/defineField/defineQuery, next-sanity client options, draft mode + stega rules
  • §7 — generateMetadata, dynamic params shape in current Next.js major (sync vs Promise), alternates.languages format
  • §7, §9 — Google's Article structured data and FAQPage required fields
  • §9 — @portabletext/react component override API and plugin packages
  • §14 — web.dev CWV thresholds for current LCP/INP/CLS "good" cutoffs
  • §17 — current GA4 / Plausible / Fathom snippet and consent integration
  • §20 — Gemini image model name, endpoint, supported sizes/aspect ratios, response schema

If something in §2–§20 contradicts the docs you just read, the docs win. Record the contradiction in §1 under "Approved overrides".


§0. Intake Questionnaire

Run this section interactively before any implementation work. The companion SKILL.md describes how to present the questions (AskUserQuestion in Claude Code, numbered plain text in Codex / CLIs without an interactive picker, assumed-defaults-with-disclosure when fully headless).

Order of operations:

  1. Scan the host project first (see SKILL.md Step 1). Note what's already in place and pre-fill any answer you can.
  2. Ask the questions below in the grouped order. Skip questions answered by the scan; surface the detected value and ask the user only to confirm.
  3. Write the resolved answers into §1.
  4. Produce the high-level plan (template at the end of §0). Wait for explicit approval before coding.

Questionnaire — 40 questions in 12 groups

A. Project identity (5)

A1. Project / brand name — used in JSON-LD publisher, OG site_name, and copy. A2. Primary domain — canonical host, no protocol (e.g. example.com). Used for absolute canonical URLs, sitemap entries, and OG tags. A3. Site purpose in one sentence — drives editorial voice and hero image direction. A4. Publisher logo asset — file path or "deferred to designer". JSON-LD publisher.logo requires a URL; missing logos block the BlogPosting schema. A5. Site type confirmation — corporate / promo blog (this spec), news publisher (use a different spec), docs site (use a different spec).

B. Internationalization (4)

B1. Locale set — single locale or multiple? If multiple, list them as BCP-47 codes (en, fr, de, es, etc.). B2. Primary locale — used as x-default in hreflang, used as fallback when the root path needs a redirect target. B3. Locale prefix rule — always present (/en/..., /fr/...) recommended, or root-default (English at /..., others at /fr/...)? Strong default: always present. Root-default creates duplicate-content risk between / and /en/. B4. Translation linkage — should the same article in different locales be cross-linked (translation graph with translationOf references) or treated as fully independent documents? Strong default: independent. Cross-linking pulls in @sanity/document-internationalization and post-level hreflang complexity.

C. Content model & taxonomy (6)

C1. Author model — single fixed string per post (lowest effort) / author entity with name only (recommended baseline) / full author entity with bio + photo + social links (heavier; only if you actually publish per-author pages). C2. Number of categories — 5 to 10 is the sweet spot. Below 5 makes filtering pointless; above 10 fragments thin archives. C3. Category list — provide names now, or defer to implementation? If deferred, hold a placeholder in §1. C4. Category editability — locked at launch, or editable later via Studio? Recommended: editable. C5. Tags — include or exclude? Strong default: exclude. Tags create thin archive pages and governance overhead at this scale. C6. Body block types — confirm the allowed list. Defaults: H2/H3/H4, lists, blockquote, inline marks, links, images with alt, FAQ block, tables. Off by default: code blocks, video embeds, pull quotes, downloadable files, custom HTML.

D. Routing & URLs (3)

D1. URL shape — flat /[locale]/blog/[slug] (recommended) vs. dated /blog/YYYY/MM/[slug] vs. categorized /blog/[category]/[slug]. Flat avoids future recategorization redirect debt. D2. Slug strategy — locale-specific slugs (recommended for multilingual) or shared slug across locales (simpler but worse for FR/DE/ES SEO). D3. Trailing slash and case rule — default: no trailing slashes, lowercase only. Confirm or override.

E. Listing & article page (5)

E1. Posts per listing page — default 12. Mobile-first layouts often look better at 9. E2. Featured post — automatic newest-first hero card on page 1 only (recommended) or editorial "featured" flag in CMS? E3. Pagination style — numbered pages (recommended) vs. "Load more" with URL update vs. infinite scroll. Infinite scroll harms SEO. E4. ToC threshold — show table of contents only when post has ≥N H2 headings AND ≥M words. Defaults: ≥4 H2 and ≥1000 words. E5. Related-posts logic — same-category newest-first with latest-from-anywhere fallback (recommended) or manual curation in CMS?

F. SEO surface (4)

F1. Structured-data scope — emit BlogPosting + BreadcrumbList on every post + FAQPage when an FAQ block exists. Confirm. Any other schemas needed (HowTo, Recipe, VideoObject)? F2. OG image strategy — reuse hero image cropped to 1200×630 via Sanity image URL (recommended) or a separate ogImage field per post. F3. RSS / Atom feed format — Atom 1.0 per locale (recommended, stricter spec, better i18n) or RSS 2.0. F4. Sitemap structure — single sitemap.ts route until ~50k URLs (recommended), or sitemap index from day one.

G. Performance & assets (4)

G1. Core Web Vitals targets — accept defaults (LCP <2.0s, INP <150ms, CLS <0.05, TTFB <600ms) or relax to the Google "good" baseline? G2. Hero image source — AI-generated via Gemini 3 Pro Image / Nano Banana Pro (use blog-image-style-guide.md) / stock photography / designer-supplied / mixed. G3. Image format opt-in — confirm an approved override to set images.formats = ['image/avif', 'image/webp'] in next.config.ts. AVIF saves 20–30% on hero LCP. If CLAUDE.md forbids next.config.ts edits, this needs explicit approval. G4. Body font and display font — reuse the site's existing next/font configuration (recommended) or add new fonts? Confirm subsets — latin is required, latin-ext is required for FR/DE/ES.

H. Analytics & consent (2)

H1. Analytics tool — Matomo / Plausible / Fathom / GA4 / Posthog / Umami / none. Self-hosted vs. SaaS. H2. Consent model — cookieless tool (no banner required) / consent-gated (load only after the visitor accepts cookies via the existing site-wide gate) / no consent gate (only legal in jurisdictions where the tool is genuinely cookieless and exempt). The blog inherits the site-wide consent gate — do not re-implement it in blog routes.

I. Content authoring & workflow (3)

I1. Studio hosting — Sanity Studio deployed to *.sanity.studio (recommended; clean separation) vs. embedded under /studio in the Next.js app. I2. Draft preview — @sanity/presentation with Sanity-login auth (recommended for human review workflows; required if editors want to preview unpublished drafts) vs. none (drafts only visible inside Studio). I3. Scheduled publishing — required at launch, deferred to later, or never? Sanity has community plugins for it.

J. AI-generated hero images (3)

J1. In scope at launch? — yes / no / phase 2. If "no", skip §20. J2. Model preference — gemini-3-pro-image-preview (best instruction following, ~$0.24/image) / gemini-2.5-flash-image (~$0.04, lower adherence) / imagen-4.0-ultra-generate-001 (best photoreal, weaker instruction following). Default: Pro. J3. Repo asset copy — also commit a copy under public/images/blog/<slug>.jpg for git history (recommended) or rely solely on Sanity CDN.

K. Explicit non-features (1, multi-select)

K1. Confirm exclusions. Default exclusions, override only if specifically needed:

  • Comments
  • Site-wide search / blog search
  • Social sharing buttons
  • Author bio pages (separate from author entity)
  • Newsletter signup inside article body (footer-wide is fine)
  • Reading progress bar
  • Dark mode toggle specific to blog (inherits site-wide if any)
  • Embedded video, code blocks, pull quotes, downloadable files
  • Tag pages
  • Category landing pages (/blog/category/[slug])

Anything ticked on this list moves into scope and needs its own spec section.

L. Entry points & launch order (2)

L1. Entry points to the blog — header nav link / footer link / homepage "latest posts" feed / dedicated landing page. Pick any combination. L2. Launch order — does the homepage feed ship at launch, or after the core blog pages are finalized? Recommended: blog pages first, homepage feed last, to avoid empty-state rework.


High-level plan template

After §0 is answered, produce the plan from this skeleton. One page maximum. Wait for explicit approval before any code change.

# Blog Implementation Plan — <Project Name>

## Scope (locked from §1)
- Locales: ...
- Author model: ...
- Categories: <N> fixed / editable / TBD
- AI hero images: yes / no
- Entry points: ...

## Phases
1. Sanity Studio — schema files (post, category, author?), seed data
2. Routes & rendering — listing, pagination, article page, smart 404
3. SEO surface — canonicals, hreflang, sitemap, JSON-LD, OG, Atom feeds, robots
4. Performance & a11y — CWV budget, font loading, ToC, reading time, focus order
5. Hero images (if J1=yes) — style guide tailoring, generator script, smoke test, batch
6. Homepage feed (if L2=last) — latest-3 cards on home
7. Verification — pnpm build, tsc, Lighthouse, axe-core, manual smoke

## Out of scope (deferred)
- <list from §K>

## Open decisions
- <items from Appendix A>

## Estimated effort
- Sanity Studio + schema: <X hours>
- Routes + listing + article: <Y hours>
- SEO surface: <Z hours>
- Performance + a11y polish: <W hours>
- AI hero images (if in scope): <V hours>
- Verification + fixes: <U hours>

§1. Project Profile

Project-specific values, populated from §0 answers. Anywhere below that says "per §1" or "from the Project Profile" refers here.

FieldValue
Project name[FILL from A1]
Primary domain[FILL from A2]
Site purpose[FILL from A3]
Publisher logo path[FILL from A4 — or "deferred"]
Locales[FILL from B1 — e.g. en / en, fr / en, fr, de]
Primary locale (x-default)[FILL from B2]
Locale prefix rule[FILL from B3 — "always present" recommended]
Translation linkage[FILL from B4 — "independent" recommended]
FrameworkNext.js (App Router) — confirm major version from package.json
i18n library[FILL — typically next-intl]
Styling[FILL — e.g. Tailwind + shadcn/ui]
Motion[FILL — typically Framer Motion]
CMSSanity v3 — Studio at [FILL from I1 — hosted *.sanity.studio / embedded /studio]
Draft preview[FILL from I2 — Sanity Presentation auth / none]
Author model[FILL from C1]
Category count target[FILL from C2 — N fixed]
Category list (at launch)[FILL from C3 — list or "deferred"]
Category editability[FILL from C4 — editable / locked]
Tags[FILL from C5 — recommended: excluded]
URL shape[FILL from D1 — recommended: flat /[locale]/blog/[slug]]
Slug strategy[FILL from D2 — locale-specific recommended]
Posts per listing page[FILL from E1 — default 12]
Featured post strategy[FILL from E2 — auto-newest recommended]
Pagination style[FILL from E3 — numbered recommended]
ToC threshold[FILL from E4 — default ≥4 H2 AND ≥1000 words]
Related-posts logic[FILL from E5 — auto same-category recommended]
OG image strategy[FILL from F2 — reuse hero crop recommended]
Feed format[FILL from F3 — Atom 1.0 recommended]
Analytics[FILL from H1+H2]
Hero image source[FILL from G2]
next.config.ts AVIF override approved[FILL from G3 — yes/no]
Excluded non-features[FILL from K1 — defaults excluded unless overridden]
Entry points[FILL from L1]
Launch order[FILL from L2]
Approved CLAUDE.md overrides[FILL — list explicitly]
Deferred to implementation[FILL — anything answered "later"]

§2. Scope

In scope: article authoring, publishing, rendering, SEO, i18n (if §1 has >1 locale), performance, accessibility, analytics for a corporate blog at the scale captured in §1.

Out of scope (defaults; override via §0.K only when justified): newsletter signup inside articles, cookie consent banner (handled site-wide), site-wide search, comments, social sharing buttons, user accounts, paid subscriptions, tags, category landing pages.


§3. Content Model

3.1 Post schema (Sanity)

FieldTypeRequiredNotes
titlestringyesOne per post
slugslugyesAuto from title, editable. Uniqueness enforced per (slug, locale) pair via query when §1 is multilingual; otherwise globally unique.
localestring enumyes only if §1 multilingualValues match the locale set in §1. Plain radio field, not @sanity/document-internationalization unless §1.B4 = cross-linked.
categoryreference → categoryyesExactly one category per post
authordepends on §1.C1yesString (C1=string) / reference → author with name only (C1=entity-light) / reference → author with full bio (C1=full-entity)
heroImageimage with hotspotyes16:9, ~1600×900 source, required alt field
excerpttext (3 lines)noManual; falls back to first ~160 chars of body
publishedAtdatetimeyesAuto-set on first publish
bodyportable text arrayyesSee §3.2

Do not store:

  • Reading time — computed server-side at render, cached with the page (see §13.2). Stale-data trap if stored.
  • dateModified — use Sanity's built-in _updatedAt.

3.2 Portable text body

Allowed block types (override the list only if §0.C6 captured a specific need):

  • Headings: H2, H3, H4. No H1 — reserved for the post title.
  • Styles: normal, blockquote
  • Lists: bullet, numbered
  • Marks: strong, emphasis, inline code, link. The link href validator must allow both absolute URLs and internal relative paths (e.g. /contact). A strict http/https/mailto/tel-only validator blocks editors from saving posts with internal links — common in AI-authored content.
  • Custom objects: image (with alt), faqBlock (see §13), table (via @sanity/table)

Excluded by default: code blocks, video embeds, pull quotes, downloadable file blocks, custom HTML. Add only when there is a concrete editorial need.

3.3 Category schema

Separate category document type:

FieldTypeRequiredNotes
titlelocalized string (if §1 multilingual)yesDisplayed label per locale
slugslugyesUsed in query params, not URL paths
ordernumbernoOptional manual sort for filter pills

Category count and editability come from §1.

3.4 Author schema (only when §1.C1 ≠ string)

FieldTypeRequiredNotes
namestringyesDisplayed byline. Shared across locales — not localized.
biotextnoOnly when §1.C1 = full-entity
photoimagenoOnly when §1.C1 = full-entity
linksarray of {label, url}noOnly when §1.C1 = full-entity

Seed at least one author at Studio setup. Posts reference authors by id so a name change flows everywhere.


§4. Taxonomy

Categories only (per §1.C5 default). No tags.

  • Exactly one category per post (enforced in schema).
  • No dedicated category landing pages. Do not build /blog/category/[slug] routes.
  • Category filtering on /blog happens via query param (/blog?category=<slug>) — client-side filter, no new SEO surface.
  • Categories are used for: filter pills on listing, breadcrumb label, card label, related-posts logic, internal organization.

Rationale: at corporate-blog scale, tags create thin archives and governance overhead. AI authors invent arbitrary tags if given the option. Topic clusters happen via in-body links and the related-posts block. If tags become essential later, add the field, but plan for category-landing-page-style governance up front.


§5. URL Structure

5.1 Routes

Assuming §1.D1 = flat (recommended):

  • Post: /[locale]/blog/[slug] — e.g. /en/blog/sample-post-title
  • Blog index: /[locale]/blog
  • Paginated index: /[locale]/blog/page/[n] starting at page 2
  • Filtered index (client-side): /[locale]/blog?category=[slug]
  • Atom feed: /[locale]/blog/feed.xml
  • Studio: at *.sanity.studio or /studio per §1.I1

For monolingual projects (§1 single-locale), drop the [locale] segment everywhere. Hreflang section (§7.3) then does not apply.

5.2 Rules

  • Locale prefix is always present when §1.B3 = always present. Every URL is /[locale]/... — there is no unprefixed /blog/[slug]. This keeps hreflang symmetric, eliminates duplicate-content risk between / and /<primary-locale>/, matches next-intl's recommended routing mode, and simplifies canonicals and sitemap generation. The site root / either redirects to /<primary-locale> or renders a locale-selection shell — never serves the primary locale's content directly at /blog/[slug].
  • Flat URLs — no year, category, or other segment in path. Prevents recategorization redirect debt.
  • No trailing slashes. Lowercase slugs only. No query params in canonical URLs.
  • Slugs are locale-specific (per §1.D2). A FR post can have a French slug, a DE post a German slug; same slug across locales is fine because queries filter by (slug, locale).

§6. i18n Handling

Skip this section entirely when §1 is monolingual.

Posts can exist in any subset of the locales in §1 independently — no forced translation pairs.

6.1 Missing-locale fallback (smart 404)

If a post slug does not exist in the requested locale, return a real HTTP 404 with a helpful empty state instead of rendering foreign-language content. The route-specific 404 must:

  • Return status code 404 (not a soft 404).
  • Show a clear message in the requested locale, e.g. "This article isn't available in [locale name]."
  • Offer one path forward: a prominent "Browse the blog" link to /[requested-locale]/blog.
  • Do not offer a deep link to "the same post in another language" when §1.B4 = independent — posts are not linked across locales, so there is no deterministic way to resolve which other-locale post is the equivalent.
  • Do not emit hreflang tags for the missing locale.
  • Do not emit JSON-LD for a nonexistent post.
  • Localized UI (header, footer, nav) stays in the requested locale.

This is the honest SEO answer, avoids duplicate-content / lang hacks, and still gives users a useful next step.

6.2 Locale switcher on blog routes

When §1.B4 = independent (recommended):

  • Target route from a blog post: /[target-locale]/blog (the blog listing in the target language), not the same post in another language.
  • Rationale: posts are not linked across locales (see §3.1 — no translationOf reference). Without shared slugs (harmful for non-primary-locale SEO) or a translation graph, "the same post in another language" is not resolvable.
  • Non-blog routes keep their normal per-page locale switching via next-intl.

When §1.B4 = cross-linked (only if explicitly chosen): the switcher resolves to the equivalent post via the translationOf graph; emit post-level hreflang and sitemap alternates accordingly.

6.3 Localized UI strings

All UI labels (read time, "More from", ToC heading, published date, 404 empty state, etc.) live in the message files per §1's i18n library (typically src/messages/<locale>.json for next-intl). Never hardcode strings in components. Date formatting delegates to the i18n library.


§7. SEO Metadata

7.1 Structured data (JSON-LD)

Emit the following on every article page:

BlogPosting (subtype of Article — semantically accurate for a corporate blog):

{
  "@context": "https://schema.org",
  "@type": "BlogPosting",
  "headline": "<title, ≤110 chars>",
  "image": ["<hero image absolute URL>"],
  "datePublished": "<publishedAt ISO>",
  "dateModified": "<_updatedAt ISO>",
  "author": { "@type": "Person", "name": "<author name>" },
  "publisher": {
    "@type": "Organization",
    "name": "<project name from §1>",
    "logo": { "@type": "ImageObject", "url": "<publisher logo absolute URL from §1>" }
  },
  "mainEntityOfPage": "<absolute canonical URL>",
  "inLanguage": "<locale>"
}

When §1.C1 = full-entity and an author has a public profile page, set author.url to the absolute profile URL. Otherwise omit url (a bare Person with name only is correct — Google does not require a URL).

BreadcrumbList (separate JSON-LD block on every post): Home → Blog → Post Title. The category is a visible breadcrumb label but not a link — do not include a category entry in the BreadcrumbList.

FAQPage — emit only when a post contains at least one faqBlock in its body. Mirrors the questions/answers exactly.

Any additional schemas captured in §0.F1 (e.g. HowTo, Recipe) go here, scoped per post type as needed.

7.2 Canonical URLs

  • Self-referencing, absolute, locale-prefixed, lowercase, no trailing slash, no query params.
  • Never cross-canonicalize between locales — that is what hreflang is for.
  • Paginated pages canonical to themselves (/blog/page/2 → /blog/page/2), never to /blog.
  • Posts that exist in only one locale do not produce a page in the other locale — the other locale returns a 404 (see §6.1). No canonical juggling required.

7.3 Hreflang

Skip when §1 is monolingual.

  • Blog post pages when §1.B4 = independent: emit no post-level hreflang tags. There is no cross-locale translation graph, so each post is an independent single-locale document even if same-topic content exists in other languages.
  • /blog listing pages: emit the full hreflang set across all locales in §1 (each locale + x-default pointing to the primary locale's index) on every locale index.
  • Paginated listing pages (/blog/page/N): emit hreflang to each locale where page N exists. Per Google, hreflang is page-based — page 2 links to page 2, not to page 1 of another locale.
  • Implement via Next.js generateMetadata alternates.languages.
<link rel="alternate" hreflang="en" href="https://example.com/en/blog" />
<link rel="alternate" hreflang="fr" href="https://example.com/fr/blog" />
<link rel="alternate" hreflang="de" href="https://example.com/de/blog" />
<link rel="alternate" hreflang="x-default" href="https://example.com/en/blog" />

When §1.B4 = cross-linked: emit post-level hreflang to the resolved translation siblings, plus matching sitemap alternates.

7.4 Meta description

  • Source: the manual excerpt field. Fallback: first ~160 chars of body text.
  • Length: 140–160 characters, one sentence, primary keyword in first 100 chars, no stuffing.

7.5 Open Graph / Twitter Cards

Required OG tags on every post: og:title, og:description, og:url, og:type=article, og:image, og:image:width=1200, og:image:height=630, og:image:alt, og:locale, article:published_time, article:modified_time, article:section (category name).

Do not emit:

  • article:author — the Open Graph spec expects an array of profile URLs. Omit unless §1.C1 = full-entity and the author actually has a public profile URL.
  • article:tag — no tags in this spec.
  • og:locale:alternate — only emit when §1.B4 = cross-linked.

Twitter: twitter:card=summary_large_image, twitter:title, twitter:description, twitter:image, twitter:image:alt.

OG image: per §1.F2. Default: reuse the hero image, cropped to 1200×630 via Sanity's image URL builder. Max file size 200 KB. Populate og:image:alt / twitter:image:alt from the Sanity alt field.

7.6 Sitemap

Single app/sitemap.ts route returning MetadataRoute.Sitemap. Include every URL (every post in its locale, every listing page, every paginated listing page) as its own <url> entry. lastmod must reflect real _updatedAt — Google penalizes sitemaps that lie about lastmod.

Alternates rule (multilingual projects):

  • Listing and paginated listing pages: emit alternates.languages pointing to the equivalent page in each other locale. These pages exist in all locales by construction, so the mapping is deterministic.
  • Post URLs when §1.B4 = independent: do not emit alternates.languages. Posts are independent single-locale documents; incorrect alternates are worse than none.

No sitemap index required until the site approaches ~50k URLs.

7.7 Robots.txt

User-agent: *
Allow: /
Disallow: /api/
Disallow: /studio
Sitemap: https://<domain from §1>/sitemap.xml
  • The /studio disallow is only relevant if Studio is embedded (§1.I1 = embedded). For hosted Studio at *.sanity.studio, the line is harmless and future-proof.
  • Do not block AI crawlers — organic visibility (including AI search) is the goal.
  • Draft previews must be noindexed per-route, not via robots.txt.

7.8 RSS / Atom feeds

  • Format: per §1.F3. Default Atom 1.0 (better i18n, stricter spec than RSS 2.0).
  • One feed per locale: /[locale]/blog/feed.xml. Each feed contains only posts in its locale.
  • Fields per entry: id, title, updated, author, link, summary (from excerpt), content (from body), category.
  • Linked from <head> of /blog indexes via <link rel="alternate" type="application/atom+xml">.

7.9 "Updated on" date display

  • Show visibly only when _updatedAt differs from publishedAt by more than 24 hours. (A typo-fix save within a day should not trigger it.)
  • When shown: format as Published <date> · Updated <date>.
  • The JSON-LD dateModified must match the visibly displayed date or Google may ignore both.

7.10 Unpublish / deletion handling

  • When a post is unpublished or deleted in Sanity, the URL must return HTTP 404 via Next.js's notFound().
  • Do not redirect old post URLs to /blog, and do not serve stale copies. Use a Sanity deletion webhook plus revalidateTag so the next request falls through to notFound().
  • Reserve 301 redirects for genuine slug changes on still-published posts (old slug → new slug, same locale).
  • 410 Gone would deindex slightly faster but notFound() returns 404 and emitting 410 cleanly requires extra route-handler plumbing. For a small corporate blog, 404 is the pragmatic answer.

§8. Blog Listing Page (/blog)

8.1 Content per page

  • Posts per page from §1.E1 (default 12).
  • Category filter pills above the grid (client-side, via ?category= query param).
  • No search box, no author filter.

8.2 Card contents

Each card shows:

  • Hero image (16:9)
  • Category label (visible, not a link)
  • Post title
  • Excerpt (1–2 lines, truncated)
  • Published date
  • Reading time

Show author on cards only when §1.C1 = full-entity AND it adds editorial signal (multi-author blog). Otherwise omit — single-string and single-entity authors are low signal on a listing grid. Author still appears on the article page itself.

8.3 Featured post

Per §1.E2. Default: automatic — the newest post appears as a larger "hero card" at the top of page 1 only. Subsequent pages use the uniform grid. No editorial "featured" flag in the CMS.

8.4 Pagination

  • Numbered pages: /blog (page 1), /blog/page/2, /blog/page/3, etc.
  • Every paginated page is indexable and self-canonical. Do not noindex pagination: Google wants paginated archives discoverable, and noindex drops them from Search. At corporate-blog scale, crawl budget is irrelevant.
  • rel=prev/next is deprecated — each paginated page stands on its own.
  • Avoid infinite scroll (Googlebot does not trigger scroll). "Load more" is acceptable only if it also updates the URL.

8.5 Listing performance

  • Use prefetch={false} on all article card links on listing pages. With 12 cards per page, default prefetch wastes bandwidth on hover-free devices and crowds the cache.
  • Lazy-load all card images except those above the fold.

§9. Article Page

9.1 Layout

Top to bottom:

The text continues at the source. Read the rest.

Source: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/web-development/building-blog/blog-technical-requirements.md

Author: davila7, Claude Code templates (davila7). License: MIT.

Shown here with formatting for the web. Keep the author and license notice when you reuse it.

Related entries

There are more like this in the members library

The Claude Code library holds 13,843 entries. Members can search all of them by meaning and read every one in full.