# Blog — playbook The blog machinery ships as files — post reads (feed paging, slug lookup with the body fieldsets), category/tag taxonomy, and the Ricos body renderer, typed end-to-end. **The presentation is yours**: you design and implement the post card, the grid, the blog index surface, and the post page surface on the shipped hooks/DTOs, plus the home page and the brand. You never write blog data logic; you never skip designing. The vertical is **read-only** — visitors read posts; authoring stays in the dashboard. ## The file map (deployed into `src/`) **Don't read the shipped files** — this table and the contracts below are everything you need. Open a shipped file's source only on a real fallback (runtime error / uncovered field), or to read a reference component's pattern. | file | what it is | |---|---| | `wix/config.ts` · `wix/sdk.ts` · `wix/media.ts` · `wix/money.ts` | shared auth seam + helpers (deploy configures; nothing to set) | | `wix/blog/types.ts` | the DTOs (`PostSummary`, `PostDetail`, `BlogCategory`, `BlogTag`, `PostPage`) — contracts below | | `wix/blog/posts.ts` | `fetchPosts` (paged, filterable), `fetchPostBySlug` (full body) | | `wix/blog/taxonomy.ts` | `fetchBlogCategories`, `fetchBlogTags`, `fetchCategoryBySlug`, `fetchTagBySlug` | | `hooks/blog/useBlogFeed.ts` | feed + taxonomy filter + load-more — contract below | | `hooks/blog/usePost.ts` | post by slug + resolved chips — contract below | | `components/blog/RichContent.tsx` | the post-body renderer — **wire AS-IS** (machinery, not a reference) | | `components/blog/BlogFeedView.tsx` (+ `PostCard`) · `PostView.tsx` | **REFERENCE implementations** — correct, plain; build your own instead of shipping them | | `styles/global.css` | the design system: Tailwind v4 + the `@theme` token block (shared across verticals) | Astro stack additionally gets: | file | what it is | |---|---| | `layouts/SiteLayout.astro` | site chrome — **yours to brand** (keep the `seo-tags` slot + global.css import). If another vertical is also deployed, its layout won — add a Blog nav link there | | `pages/blog.astro` | SSR feed — **keep the frontmatter**, swap the island import to YOUR component | | `pages/blog/[...slug].astro` | SSR post page with owner-editable SEO — **keep the frontmatter, the `[...slug]` rest param, and the SEO pieces** (`wixMetadata`, `loadSEOTagsServiceConfig`, ``) exactly; restyle the template. The body island stays `client:only="react"` (the ricos viewer breaks under SSR) | ## What you build — the design job 1. **The post card + grid** — your tile (cover, title, excerpt, date · min-read presentation) and rhythm, with skeletons while loading and an honest empty state. 2. **The blog index surface** — the feed on `useBlogFeed`: category filter (only when >1 non-empty category), the grid, and a load-more control gated on `hasMore`. 3. **The post page surface** — header (categories eyebrow, title, date, cover), the body via the shipped `RichContent`, and the tag chips — restyle the `[...slug].astro` template around it. 4. **The home page** — hero, latest posts (fetch in frontmatter → your components), brand story. Plus the **theme** (`@theme` block, one edit) and the **chrome** (`SiteLayout`, one pass). Style everything with Tailwind utilities on the tokens. Dark theme: the ricos CSS hardcodes near-black text — add a global override scoping `.ricos-content` to the foreground token (in Astro use `