Revive blog posts as a content-typed gitsheets sheet (revises the deferred decision)
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- markdown, typescript
調査の方向性
まず issue #44 と specs/deferred.md の延期された決定を読み、次に既存の gitsheet パターンと apps/api/scripts/import-laddr.ts を調べます。apps/api/scripts/import-laddr/translators.ts と、参照されている BlogPost スキーマおよび routing 要件を追跡します。content-typed blog-post sheet、API、SPA routes、importer の復活、および記載された spec の更新が、除外された workflows なしで実装されていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
specs/deferred.md currently says blog posts get replaced by "staff-authored markdown files in the code repo at apps/web/src/content/blog/<slug>.md, shipped via PR." That decision predates gitsheets v1.2's content-typed records.
With v1.2 we can give blog posts their own gitsheets sheet — markdown bodies + TOML frontmatter — and get a better outcome than files-in-code-repo:
Why this beats the original deferral
| Concern | Files-in-code-repo | Content-typed sheet |
|---|---|---|
| PR-reviewable | ✅ | ✅ |
| Publish cadence | Tied to web deploys | Immediate on data-repo merge |
| Tags / cross-links | Ad-hoc frontmatter | Native TagAssignment |
| Author attribution | Hand-stamp in frontmatter | Native Person reference |
| Snapshot inclusion | Not in data snapshot | In the snapshot (pseudonymized) |
| API serving | Bespoke Vite handler | Existing read API pipeline |
/blog index cost |
Bundle every post into web build | queryAll({ withBody: false }) |
| laddr-import revival | Out of scope | Resurrect blog_posts table on the existing one-shot import |
Sheet shape
# .gitsheets/blog-posts.toml
[gitsheet]
root = 'blog-posts'
path = '${{ slug }}'
[gitsheet.format]
type = 'markdown'
body = 'body'
[gitsheet.schema]
$ref = './schemas/BlogPost.schema.json'
BlogPost entity (in packages/shared/src/schemas/blog-post.ts):
idUUIDv7legacyId(laddr'sBlogPost.ID, for the importer's idempotence)slug(kebab-case, slug-handle conventions)titlesummary(short markdown — stays in frontmatter)authorId→ PersonpostedAt(iso8601)editedAtnullablefeaturedImageKeynullable (attachment via gitsheets)deletedAtnullable (soft-delete)body(the markdown body — the designated content field)- standard
createdAt/updatedAt
Routing
Add to the SPA:
/blog— index (paginated, optional tag filter)/blog/:slug— detail/blog/tag/:namespace/:slug— tag-filtered (reuseTagsNamespacepattern)
API:
GET /api/blog-posts(list with facets, q, sort, page)GET /api/blog-posts/:slug(detail)POST/PATCH/DELETE— staff-only (per the original spec, blog wasn't a per-user-role CMS)
laddr-import revival
The existing one-shot importer at apps/api/scripts/import-laddr.ts currently skips blog_posts. Re-add it as another translator in apps/api/scripts/import-laddr/translators.ts:
- Map
BlogPost.Slug→slug(slugify-with-dedupe if invalid) - Map
BlogPost.Title→title - Map
BlogPost.Body→body - Map
BlogPost.AuthorID→ resolve via the existingidMaps.personByLegacy - Map
BlogPost.Published(and similar) →postedAt - Preserve
legacyIdso re-runs are idempotent
Sequencing
- Depends on #44 (content-typed gitsheets is the substrate) — or stand on its own as the first content-typed sheet in the project. Either order works since blog-posts is a brand-new sheet that doesn't conflict with the existing TOML-only ones.
- Sequenced after
cutover-prepso existing migration paths stay valid through cutover.
Spec updates needed
specs/deferred.md— update the "Blog (/blog) as a user-facing CMS" entry from "files in code repo" to "content-typed sheet, see this issue."- New spec files:
specs/api/blog.md,specs/screens/blog-index.md,specs/screens/blog-detail.md. specs/data-model.md— addBlogPostentity.specs/behaviors/legacy-id-mapping.md— note the newBlogPost.legacyIdaxis.
Out of scope: comments, reactions, the multi-author "posts under a topic" workflow — keep it as simple as the original deferral imagined.
- 主要言語
- TypeScript
- スター
- 1
- フォーク
- 1
- 平均マージ
- 1日 20時間
- マージ済み PR(30日)
- 25
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
CodeForPhilly/codeforphilly-ng のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
-
MarkdownEditor toolbar: use Radix Toolbar from radix-ui instead of the hand-rolled roving tabindex オープンenhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
CodeForPhilly/codeforphilly-ng の issue をすべて見る
似ている issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
motiondivision/motion#3849 ·
-
Add: S Play Event HD オープンcheck:passed streams:add
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
i-am-bee/beeai-framework#1697 · リアクション 1 件 ·
-
Support bun dedupe オープンenhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
antfu/node-modules-inspector#214 ·