Docs: generate a share image for every docs page

Aperta
#118 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
nextjs, react, typescript

Direzione di ricerca

Start in app/docs/[...slug]/page.tsx and lib/marketing/metadata.ts, where the per-page title and description are set, then look for an existing opengraph-image route in app/ (the blog may have one) to copy. Add the image URL, width, height and alt text to the Open Graph and Twitter metadata, and add a test for at least one docs page. Done when every /docs page has its own image showing its title and section, long titles wrap without overflowing, and pnpm test and pnpm build pass.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

documentation enhancement frontend help wanted

Copied from DeadantCo/answerLoops#108 · originally opened by sethr07 on 2026-11-20

Copied from https://github.com/answerLoops/answerLoops/issues/479 — originally opened by @NathanTarbert on 2026-10-26

Problem

When a docs page is shared (Slack, Discord, X, a link preview) it shows the same generic card for every page, so every shared link looks the same. A shared link to the Slack guide should say it is the Slack guide.

Where

  • app/docs/[...slug]/page.tsx builds each docs page's metadata. It already sets the title and description through publicPageMetadata in lib/marketing/metadata.ts.
  • Next.js supports generated Open Graph images through an opengraph-image route file, and the blog may already do something similar; check app/ for an existing example to reuse.

Suggested approach

Generate a share image per docs page at build time: the page title, its section (for example "Integrations"), and the answerLoops mark, on the docs navy and teal. Keep it deterministic so the same page always produces the same image. Add the image to the page's Open Graph and Twitter card metadata.

Acceptance criteria

  • Every page under /docs has its own share image showing its title and section.
  • The metadata includes the image URL, width, height and alt text.
  • Long titles wrap or shrink without overflowing the card.
  • Images are generated at build time (no per-request cost) and the build time stays reasonable.
  • pnpm test and pnpm build pass, and a test covers the metadata for at least one page.

Start here: new to the project? Read CONTRIBUTING.md first. It covers the ground rules, running answerLoops locally, and how to open a pull request.

Lingua principale
TypeScript
Stelle
0
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di DeadantCo/answerLoopsdev

Tutte le issue di DeadantCo/answerLoopsdev

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.