Blog auf @core/content: Beiträge, Autoren, Kategorien, Tags, Serien, ähnliche Beiträge, Archiv und RSS/Atom/JSON-Feeds
Installieren
genpm add @core/blogWas du bekommst
- Quellcode in src/lib/blog/, 7 Dateien. (20 kB)
- KI-Regeln in src/lib/blog/AGENTS.md, dazu Regeldateien für die IDE.
- Umgebungsvariablen in .env.example ergänzt: SITE_URL.
- Löst @core/content, @core/contracts, @core/db, @core/rich-text für dich auf.
README
Dieses Paket hat keine README.
Genau das liest deine KI, wenn sie in src/lib/blog arbeitet. Sonst wird ihrem Kontext nichts hinzugefügt.
@core/blog — rules for AI agents
Purpose
Blog domain built only from @core/content collections (posts, authors, categories, tags, series; no tables of
its own): filtered and paginated listings, a post with its relations resolved, related posts, monthly archive, series
order, RSS 2.0 / Atom / JSON Feed, sitemap and search sources and admin resources. No routes or templates (those
come from the app or @core/kit-blog), no comments or newsletter (separate modules).
Map
index.ts— public API:listPosts,getPost,relatedPosts,archive,postsInMonth,rssFeed,atomFeed,jsonFeed,blogSitemapSource,blogSearchSource,blogAdminResources.collections.ts— schemas (PostSchemausesRichTextSchema).posts.ts— reads.feeds.ts— feeds.sources.ts— sitemap/search/admin.
Integration
- Import this module at startup (it registers the collections) and set
SITE_URL. - Routes (Next.js example):
/blog→listPosts({ page, locale });/blog/[slug]→getPost(slug, { locale, draft })(404 when null) +relatedPosts(post);/blog/category/[slug]→listPosts({ category }); same fortag,author,series. - Feeds:
/blog/feed.xml→rssFeed({ title, description })(application/rss+xml),/blog/atom.xml,/blog/feed.json. - Register
blogSitemapSource()insrc/genpm/seo.ts,blogSearchSource()insrc/genpm/search.tsand...blogAdminResources()insrc/genpm/admin.ts. - Render the body with
<RichText doc={post.data.body} />(@core/rich-text) and addjsonLd.article(...)(@core/seo). - Verify: publish a post, it appears in
/blog, the feed and the sitemap; a scheduled post does not.
Conventions
- Relations are slugs: create the author/category/tag entries with the same slug.
membersOnlyposts: the page must hide the body unless the user is entitled; feeds and search only expose the excerpt.- Paths default to
/blog/<slug>; pass your ownpath/postPathif the blog lives elsewhere.
Don't
- Don't query
content_entriesdirectly for posts; uselistPosts(it respects publication and locale fallback). - Don't put the full body of members-only posts in feeds, search or meta descriptions.
# @core/blog — rules for AI agents
## Purpose
Blog domain built only from @core/content collections (`posts`, `authors`, `categories`, `tags`, `series`; no tables of
its own): filtered and paginated listings, a post with its relations resolved, related posts, monthly archive, series
order, RSS 2.0 / Atom / JSON Feed, sitemap and search sources and admin resources. No routes or templates (those
come from the app or @core/kit-blog), no comments or newsletter (separate modules).
## Map
- `index.ts` — public API: `listPosts`, `getPost`, `relatedPosts`, `archive`, `postsInMonth`, `rssFeed`, `atomFeed`, `jsonFeed`, `blogSitemapSource`, `blogSearchSource`, `blogAdminResources`.
- `collections.ts` — schemas (`PostSchema` uses `RichTextSchema`). `posts.ts` — reads. `feeds.ts` — feeds. `sources.ts` — sitemap/search/admin.
## Integration
1. Import this module at startup (it registers the collections) and set `SITE_URL`.
2. Routes (Next.js example): `/blog` → `listPosts({ page, locale })`; `/blog/[slug]` → `getPost(slug, { locale, draft })`
(404 when null) + `relatedPosts(post)`; `/blog/category/[slug]` → `listPosts({ category })`; same for `tag`, `author`, `series`.
3. Feeds: `/blog/feed.xml` → `rssFeed({ title, description })` (`application/rss+xml`), `/blog/atom.xml`, `/blog/feed.json`.
4. Register `blogSitemapSource()` in `src/genpm/seo.ts`, `blogSearchSource()` in `src/genpm/search.ts` and `...blogAdminResources()` in `src/genpm/admin.ts`.
5. Render the body with `<RichText doc={post.data.body} />` (@core/rich-text) and add `jsonLd.article(...)` (@core/seo).
6. Verify: publish a post, it appears in `/blog`, the feed and the sitemap; a scheduled post does not.
## Conventions
- Relations are slugs: create the author/category/tag entries with the same slug.
- `membersOnly` posts: the page must hide the body unless the user is entitled; feeds and search only expose the excerpt.
- Paths default to `/blog/<slug>`; pass your own `path`/`postPath` if the blog lives elsewhere.
## Don't
- Don't query `content_entries` directly for posts; use `listPosts` (it respects publication and locale fallback).
- Don't put the full body of members-only posts in feeds, search or meta descriptions.
Der genaue Baum, der nach .genpmignore eingebunden wird. Gepinnt an
# @core/blog — rules for AI agents
## Purpose
Blog domain built only from @core/content collections (`posts`, `authors`, `categories`, `tags`, `series`; no tables of
its own): filtered and paginated listings, a post with its relations resolved, related posts, monthly archive, series
order, RSS 2.0 / Atom / JSON Feed, sitemap and search sources and admin resources. No routes or templates (those
come from the app or @core/kit-blog), no comments or newsletter (separate modules).
## Map
- `index.ts` — public API: `listPosts`, `getPost`, `relatedPosts`, `archive`, `postsInMonth`, `rssFeed`, `atomFeed`, `jsonFeed`, `blogSitemapSource`, `blogSearchSource`, `blogAdminResources`.
- `collections.ts` — schemas (`PostSchema` uses `RichTextSchema`). `posts.ts` — reads. `feeds.ts` — feeds. `sources.ts` — sitemap/search/admin.
## Integration
1. Import this module at startup (it registers the collections) and set `SITE_URL`.
2. Routes (Next.js example): `/blog` → `listPosts({ page, locale })`; `/blog/[slug]` → `getPost(slug, { locale, draft })`
(404 when null) + `relatedPosts(post)`; `/blog/category/[slug]` → `listPosts({ category })`; same for `tag`, `author`, `series`.
3. Feeds: `/blog/feed.xml` → `rssFeed({ title, description })` (`application/rss+xml`), `/blog/atom.xml`, `/blog/feed.json`.
4. Register `blogSitemapSource()` in `src/genpm/seo.ts`, `blogSearchSource()` in `src/genpm/search.ts` and `...blogAdminResources()` in `src/genpm/admin.ts`.
5. Render the body with `<RichText doc={post.data.body} />` (@core/rich-text) and add `jsonLd.article(...)` (@core/seo).
6. Verify: publish a post, it appears in `/blog`, the feed and the sitemap; a scheduled post does not.
## Conventions
- Relations are slugs: create the author/category/tag entries with the same slug.
- `membersOnly` posts: the page must hide the body unless the user is entitled; feeds and search only expose the excerpt.
- Paths default to `/blog/<slug>`; pass your own `path`/`postPath` if the blog lives elsewhere.
## Don't
- Don't query `content_entries` directly for posts; use `listPosts` (it respects publication and locale fallback).
- Don't put the full body of members-only posts in feeds, search or meta descriptions.
Dieses Paket deklariert keine MCP-Server.
| Version | Commit | Veröffentlicht | Prüfung |
|---|---|---|---|
| 1.0.1 | 8aaf3ee | vor 3 Stunden | Prüfung bestanden |
- npm
- zod ^4.0.0
- vorgeschlagen
- GenPM schlägt den npm-Befehl vor und führt ihn nur aus, wenn du zustimmst.
- Verwendet von (1)
- @core/kit-blog ^1.0.0
- Prüfung
- Prüfung bestanden · 0 Befunde
- Commit
- v1.0.1 → 8aaf3ee41bc0e822456e2ca2de743f11eee88f20 · nach dem Abruf verifiziert
- Skripte
- Keine. GenPM führt niemals Paketcode aus.
- Lizenz
- MIT
- Qualität
- 100/100
- Anerkannte Lizenzerfüllt
- AGENTS.md erklärt den Zweckerfüllt
- AGENTS.md enthält Integrationsschritteerfüllt
- AGENTS.md nennt Konventionen oder Verboteerfüllt
- Enthält Testserfüllt
- Sicherheitsscan bestandenerfüllt
- In den letzten 6 Monaten veröffentlichterfüllt
- Verifizierter Herausgebererfüllt
- Zusammenfassung und Schlagwörtererfüllt
- Meldung
- Stimmt etwas nicht?