Next.js 向けブログキット:著者・カテゴリ・タグ・シリーズ付き記事、フィード、承認制コメント、ニュースレター
インストール
genpm add @core/kit-blog含まれるもの
- src/app/(blog)/ にソースコード(32 ファイル)。 (36.2 KB)
- src/app/(blog)/AGENTS.md に AI ルール、加えて IDE 用のルールファイル。
- .env.example に追加される環境変数: NEWSLETTER_FROM, NEWSLETTER_POSTAL_ADDRESS, NEWSLETTER_SECRET。
- @core/blog, @core/comments, @core/kit-cms, @core/newsletter を自動で解決します。
README
このパッケージには README がありません。
これは AI が src/app/(blog) で作業するときに読む内容そのものです。それ以外はコンテキストに追加されません。
@core/kit-blog — rules for AI agents
Purpose
A complete blog on top of @core/kit-cms, edited in the same /admin: posts with rich text and cover images, author
profiles, categories, tags and series, scheduling, RSS/Atom/JSON feeds, site search, moderated comments, newsletter
with double opt-in and one-click unsubscribe, share links without third-party scripts and full SEO (BlogPosting
JSON-LD, sitemap, Open Graph). Glue and templates only: logic lives in @core/blog, comments and newsletter.
Map
_templates/genpm.md— the exact lines this kit adds to the project'ssrc/genpm/*.ts(generated, always current).blog/page.tsx— index (featured first,?page=).blog/[slug]/page.tsx— post.blog/{category,tag,author,series}/[slug]/page.tsx— archives (shared_lib/archive.tsx).blog/archive/[year]/[month].blog/feed.xml,blog/atom.xml,blog/feed.json— feeds.api/comments/[type]/[id]— comments (typepost).newsletter/{subscribe,confirm,unsubscribe}— routes;newsletter/{confirmed,unsubscribed,invalid}— pages._components/—PostList,PostCard,Comments,SubscribeForm,ShareLinks,blog.css(the visual template)._blocks/latest-posts.tsx— "Latest posts" block for CMS pages._lib/campaign.ts— "Create newsletter campaign" action.
Integration
- @core/kit-cms must be integrated first (follow its AGENTS.md if it was installed with this kit).
- Env:
NEWSLETTER_FROM,NEWSLETTER_POSTAL_ADDRESS,NEWSLETTER_SECRET(≥ 32 chars) and, in production,RESEND_API_KEY(see src/lib/newsletter/AGENTS.md). Explain to the person how to verify their sending domain (SPF, DKIM, DMARC) with their email provider; do not change their DNS yourself. - Migrations for @core/comments and @core/newsletter (src/lib/db/AGENTS.md).
- Add the lines of
_templates/genpm.mdto the project'ssrc/genpm/*.ts(it says which file and where): the blog collections, sitemap and search sources, thelatestPostsblock, and the admin resources (posts with "Create newsletter campaign", taxonomies, comments, newsletter) plus the pending-comments widget. - Add "Blog" to the header menu in Admin → Menus, and link the feeds from the site footer if wanted.
- Verify: create an author and a post, schedule it, check it is absent from
/blog, the feed and the sitemap until its time; comment as a guest (goes to moderation) and approve it; subscribe, confirm from the email and unsubscribe. Without an OAuth app nobody can sign in to the admin: an agent can create the author and posts withseedEntry/createEntry+publish(@core/content) from a script. WithoutRESEND_API_KEY, emails are printed to the console only undernext dev(next startis production and refuses to send without a provider).
Conventions
- Posts reference authors, categories, tags and series by slug; renaming a slug breaks links, so prefer editing names.
membersOnlyposts show only the excerpt here; with @core/billing, decide access withhasEntitlementinblog/[slug]/page.tsx.- The templates in
_componentsbelong to the project after installation: adapt markup andblog.cssfreely.
Don't
- Don't add third-party share or comment widgets (scripts and cookies without consent); keep plain links.
- Don't import subscriber lists without demonstrable consent, and never remove the unsubscribe link or postal address.
- Don't publish comments from guests without moderation unless the owner asks for it (
moderation: 'guests').
# @core/kit-blog — rules for AI agents
## Purpose
A complete blog on top of @core/kit-cms, edited in the same `/admin`: posts with rich text and cover images, author
profiles, categories, tags and series, scheduling, RSS/Atom/JSON feeds, site search, moderated comments, newsletter
with double opt-in and one-click unsubscribe, share links without third-party scripts and full SEO (BlogPosting
JSON-LD, sitemap, Open Graph). Glue and templates only: logic lives in @core/blog, comments and newsletter.
## Map
- `_templates/genpm.md` — the exact lines this kit adds to the project's `src/genpm/*.ts` (generated, always current).
- `blog/page.tsx` — index (featured first, `?page=`). `blog/[slug]/page.tsx` — post.
- `blog/{category,tag,author,series}/[slug]/page.tsx` — archives (shared `_lib/archive.tsx`). `blog/archive/[year]/[month]`.
- `blog/feed.xml`, `blog/atom.xml`, `blog/feed.json` — feeds. `api/comments/[type]/[id]` — comments (type `post`).
- `newsletter/{subscribe,confirm,unsubscribe}` — routes; `newsletter/{confirmed,unsubscribed,invalid}` — pages.
- `_components/` — `PostList`, `PostCard`, `Comments`, `SubscribeForm`, `ShareLinks`, `blog.css` (the visual template).
- `_blocks/latest-posts.tsx` — "Latest posts" block for CMS pages. `_lib/campaign.ts` — "Create newsletter campaign" action.
## Integration
1. @core/kit-cms must be integrated first (follow its AGENTS.md if it was installed with this kit).
2. Env: `NEWSLETTER_FROM`, `NEWSLETTER_POSTAL_ADDRESS`, `NEWSLETTER_SECRET` (≥ 32 chars) and, in production,
`RESEND_API_KEY` (see src/lib/newsletter/AGENTS.md). Explain to the person how to verify their sending domain
(SPF, DKIM, DMARC) with their email provider; do not change their DNS yourself.
3. Migrations for @core/comments and @core/newsletter (src/lib/db/AGENTS.md).
4. Add the lines of `_templates/genpm.md` to the project's `src/genpm/*.ts` (it says which file and where): the blog
collections, sitemap and search sources, the `latestPosts` block, and the admin resources (posts with "Create
newsletter campaign", taxonomies, comments, newsletter) plus the pending-comments widget.
5. Add "Blog" to the header menu in Admin → Menus, and link the feeds from the site footer if wanted.
6. Verify: create an author and a post, schedule it, check it is absent from `/blog`, the feed and the sitemap until
its time; comment as a guest (goes to moderation) and approve it; subscribe, confirm from the email and unsubscribe.
Without an OAuth app nobody can sign in to the admin: an agent can create the author and posts with `seedEntry` /
`createEntry` + `publish` (@core/content) from a script. Without `RESEND_API_KEY`, emails are printed to the console
only under `next dev` (`next start` is production and refuses to send without a provider).
## Conventions
- Posts reference authors, categories, tags and series by slug; renaming a slug breaks links, so prefer editing names.
- `membersOnly` posts show only the excerpt here; with @core/billing, decide access with `hasEntitlement` in `blog/[slug]/page.tsx`.
- The templates in `_components` belong to the project after installation: adapt markup and `blog.css` freely.
## Don't
- Don't add third-party share or comment widgets (scripts and cookies without consent); keep plain links.
- Don't import subscriber lists without demonstrable consent, and never remove the unsubscribe link or postal address.
- Don't publish comments from guests without moderation unless the owner asks for it (`moderation: 'guests'`).
.genpmignore 適用後に組み込まれる正確なツリーです。固定先:
MIT License
Copyright (c) 2026 GenPM
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
このパッケージは MCP サーバーを宣言していません。
| バージョン | コミット | 公開日 | スキャン |
|---|---|---|---|
| 1.0.1 | fa952a4 | 5 時間前 | スキャン合格 |
- 提案
- GenPM は npm コマンドを提案し、あなたが承認した場合にのみ実行します。
- 利用元(0)
- まだこのパッケージに依存する公開パッケージはありません。
- スキャン
- スキャン合格 · 指摘 0 件
- コミット
- v1.0.1 → fa952a4b7c71340c947de8bef049f8d9c18f7871 · 取得後に検証済み
- スクリプト
- なし。GenPM はパッケージのコードを実行しません。
- ライセンス
- MIT
- 品質
- 100/100
- 認識されたライセンス達成
- AGENTS.md に目的の説明がある達成
- AGENTS.md に統合手順がある達成
- AGENTS.md に規約や禁止事項がある達成
- テストを含む達成
- セキュリティスキャンに合格達成
- 過去 6 か月以内に公開達成
- 認証済みの公開者達成
- 概要とキーワード達成
- 報告
- 問題を見つけましたか?