Geração de imagem social (OG e capa) a partir de JSX

Offen
#1,224 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
45/100
Issue-Typ
Feature
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
typescript
Bereich
frontend

Rechercherichtung

Start from seo/index.ts, which today exports tags and JSON-LD but no image generation, and add an ./seo/og entry point exposing renderOgCard and ogTags. Read the private AC references only as shape hints: apps/store/src/lib/og-card.ts (satori + @resvg/resvg-js, raw logo) and cover-render.ts (pictogram data URI, cover height) — do not copy paths. Done means the four acceptance criteria hold: a 1200×630 PNG with an embedded font, ellipsis truncation for long text, an explicit missing-peer error, and absolute https og:image validation covered by tests. Coordinate with parent issue #1089.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

area:components area:seo enhancement

Versão: @codeatlasdev/ui 4.6.0 · código lido em main (950628f2) · classe: lacuna (migração do AC)

Problema

O AC depende deste comportamento hoje e a lib não o oferece. Sem ele, a migração perde qualidade no desktop, no mobile ou no PWA.

O que a lib já oferece (para não duplicar) e o que falta

(leitura de origin/main, seo/index.ts exporta tags e JSON-LD) sem geração de imagem. ./seo não tem OG.

Referência no AC

Caminhos do repo AC (repo privado, só caminho):

apps/store/src/lib/og-card.ts:8-11 (satori, @resvg/resvg-js, ac-logo.astro?raw), apps/store/src/lib/cover-render.ts:6-10 (pictogramDataUri, COVER_HEIGHT).

Defeitos do AC (verificados por leitura do código): nenhum por leitura.

Proposta

./seo/og com renderOgCard({ template, width: 1200, height: 630, fonts }) usando satori e resvg como peers opcionais, e ogTags(card) para og:image e twitter:image.

Critério de aceite (testável)

  • Saída de 1200×630 PNG com fonte embutida (sem fallback de fonte do sistema).
  • Texto longo é cortado com reticências e não estoura a caixa.
  • Sem peers (satori/resvg), renderOgCard lança erro explícito de dependência.
  • A tag og:image aponta para URL absoluta https (validação).

Mãe: #1089

Vorherrschende Sprache
TypeScript
Sterne
6
Forks
3
Ø Merge
5 Std. 21 Min.
Gemergte PRs (30 T.)
378

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus codeatlasdev/ui

Alle Issues in codeatlasdev/ui

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.