Docs: generate a share image for every docs page

Ouverte
#118 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
55/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active
Stack technique
nextjs, react, typescript

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
TypeScript
Étoiles
0
Forks
0
Métriques de merge des PR
Aucune PR mergée en 30 j

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de DeadantCo/answerLoopsdev

Toutes les issues de DeadantCo/answerLoopsdev

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.