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

オープン
#1,224 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
frontend

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
TypeScript
スター
6
フォーク
3
平均マージ
5時間 21分
マージ済み PR(30日)
378

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

codeatlasdev/ui のほかの issue

codeatlasdev/ui の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。