# Blog Magazine

> A blog front page set like a newspaper: masthead with dateline and section nav, a lead story with a big serif headline and standfirst, secondary headlines and a numbered Most read rail divided by hairline rules. A newsletter strip confirms in place, then section rows of four stories turn into swipeable rows on phones. Whole stories are links; headlines underline on hover.

- Slug: `blog-magazine`
- Category: [Blog](https://www.assembli.design/category/blog.md)
- Type: block
- Tags: blog, magazine, editorial, newspaper, front-page, most-read, newsletter, articles
- npm dependencies: motion, lucide-react
- shadcn/ui dependencies: none
- Live preview: https://www.assembli.design/preview/blog-magazine
- Page: https://www.assembli.design/components/blog-magazine

![Blog Magazine preview](https://www.assembli.design/thumbnails/blog-magazine-light.png)

## Props

Other props pass through to the root element.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `title` | `string` | `"The Journal"` | Masthead name. |
| `dateline` | `string` |  | Text above the masthead, e.g. the issue date. Pass a string so server and browser agree. |
| `issue` | `string` |  | Small label at the other end of the dateline, e.g. "Issue 48". |
| `nav` | `{ label: string; href: string; current?: boolean }[]` |  |  |
| `lead` (required) | `MagazineStory` |  |  |
| `secondary` | `MagazineStory[]` | `[]` | Up to three headlines beside the lead; the first may carry an image. |
| `mostRead` | `MagazineStory[]` | `[]` |  |
| `sections` | `MagazineSection[]` | `[]` |  |
| `newsletter` | `\| false \| { title: string; description?: string; /** Reject (throw) to show an …` |  | The newsletter strip between the front page and the section rows. Pass false to hide it. |

## Install

One-time setup (needs a subscription):

1. Add the registry to the project's `components.json`: `{"@assembli":{"url":"https://www.assembli.design/r/{name}.json","headers":{"Authorization":"Bearer ${ASSEMBLI_API_KEY}"}}}` (merge into `"registries"`).
2. Put an API key from https://www.assembli.design/account in `.env.local` as `ASSEMBLI_API_KEY=asm_…`.

Then install with the shadcn CLI (writes `components/blog-magazine/blog-magazine.tsx` and installs dependencies):

```bash
npx shadcn@latest add @assembli/blog-magazine
```

Registry item JSON: https://www.assembli.design/r/blog-magazine.json (send `Authorization: Bearer <api key>`)

## Code

> Component source needs an Assembli subscription ($12/month or $96/year) and an API key sent as `Authorization: Bearer <key>`. To get one without copying anything, POST https://www.assembli.design/api/agent/login (or call the MCP tool connect_account), show the user the link it returns, and poll https://www.assembli.design/api/agent/token for the key. Or subscribe at https://www.assembli.design/pricing and create a key at https://www.assembli.design/account.
