# Content

> Typed, localized content entries per organization, such as pages and posts, with a slug unique per type and locale. Entries are drafted, scheduled and published, optionally through approvals, and anyone can read published entries.

- Category: Content & files
- Module: `content`
- Modes: `managed`, `custom`
- Docs: https://bettersupabase.com/docs/blocks/content
- Page: https://bettersupabase.com/blocks/content

## Install

```bash
npx better-supabase add content
```

The command also installs `updated-at`, `memberships`, `permissions`, `subjects`.

## Configure

Add the block to `better-supabase.config.ts`:

```ts
import { defineConfig } from "better-supabase/config";

export default defineConfig({
  blocks: {
    // Required by content; add installs them too.
    "updated-at": {},
    memberships: {},
    permissions: {},
    subjects: {},
    // Modes: "managed", "custom". The default is "managed".
    content: { mode: "managed" },
  },
});
```

## Client

The block has no React entry yet. Its server-side TypeScript is in `better-supabase/blocks/content`.

## Events

- `content_entry.archived`
- `content_entry.created`
- `content_entry.published`
- `content_entry.scheduled`
- `content_entry.unscheduled`
- `content_entry.updated`

## Related blocks

Requires: [memberships](https://bettersupabase.com/blocks/memberships.md), [permissions](https://bettersupabase.com/blocks/permissions.md), [subjects](https://bettersupabase.com/blocks/subjects.md)

Works with: [approvals](https://bettersupabase.com/blocks/approvals.md), [versions](https://bettersupabase.com/blocks/versions.md), [attachments](https://bettersupabase.com/blocks/attachments.md), [outbox](https://bettersupabase.com/blocks/outbox.md), [audit](https://bettersupabase.com/blocks/audit.md)
