# A media plan from one source

**Goal:** from one folder of Markdown files and one data table, produce every support of a campaign
— vertical cards for stories, a square carousel, a short film in two ratios and two languages, an A3
poster per partner and a leaderboard banner — and check that each file is listed in `exports.json`.

A media plan usually means the same figures redrawn in five tools, each copy drifting from the
others. Récit reads the figures once (`data:` in the front matter), draws them with the same
directives (`:::kpi`, `::chart`, `::map`, `::qr`) in every format, and exports each support at the
size its channel expects.

The complete working files for this guide live in `examples/media-kit/`: `story.md`, `film.md` and
`film.fr.md`, `carousel.mdx`, `poster.md`, `banner.md`, the `data/` folder and the `logos/` folder.
The blocks below are excerpts of those files, shortened to what each step needs. Its scenario is
also an end-to-end test, which runs each step below.

## 1. Share the data and the signature

Put the figures in one table next to the stories, and point each story to it with `data:` in its
front matter:

```yaml
data:
  lorem: ./data/lorem.csv
```

Put what every support shares in `recit.config.ts`: the theme colors, the signature (`brand:`) and
the defaults of tracked links (`utm:`).

```ts title="recit.config.ts"
import { defineConfig } from "recit/config";

export default defineConfig({
  i18n: {
    defaultLocale: "en",
    locales: ["en", "fr"],
  },
  theme: {
    colors: {
      primary: "#c2410c",
      accent: "#0f766e",
    },
  },
  brand: {
    logo: "./logos/lorem.svg",
    mention: "Lorem Studio",
    position: "bottom-right",
  },
  utm: {
    source: "media-kit",
    campaign: "lorem-2026",
  },
});
```

The signature is drawn on every card, slide, page and film shot; without `brand:`, nothing is drawn
and the layout leaves no gap. A story overrides it in its front matter, and `brand: false` removes
it from one story. See [Variants and signature](/documentation/guides/variants-and-signature).

## 2. Write the vertical cards

`story.md` is a web story in `9:16`, one card per scene. Its front matter names the channel and the
text of the post, which travel with every exported file:

```markdown title="story.md"
---
title: Lorem Media Story
format: webstory
aspectRatio: 9:16
channel: instagram
copy: "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
data:
  lorem: ./data/lorem.csv
---

--- id=figures

## Key figures

:::kpi
- :value{data=lorem field=value agg=sum format=compact} Annual volume
- :value{data=lorem field=value agg=max} Monthly peak
:::

--- id=qr

## Scan the guide

::qr{url="https://example.com/lorem" label="example.com/lorem" size="180px"}
```

A web story also takes `aspectRatio: 4:5` or `1:1` for a feed post. `::qr` draws a vector code, and
adds the `utm_*` parameters of the configuration to its address (`utm_medium` is `qr` unless you set
it); `utm="none"` keeps the address as written.

## 3. Write the square carousel and the film

`carousel.mdx` is a deck in `aspectRatio: 1:1`, with the same `:::kpi` and `::chart` as the cards.
`film.md` is a film (`format: motion`): a `::chart` scene becomes an animated still, a `type=stat`
scene a large figure, and the text under `:::notes` its spoken line and caption. `film.fr.md`
completes it in French scene by scene, as a web story's languages do: it repeats only what changes.

`copy:` takes one text per language:

```yaml
copy:
  en: "Lorem ipsum dolor sit amet in five scenes."
  fr: "Lorem ipsum dolor sit amet en cinq scènes."
```

## 4. Write the poster and the banner

A poster and a banner are not formats of their own: they are print layouts of a report,
`print.layout: poster` or `print.layout: banner`.

`poster.md` prints on A3 with 3 mm of bleed, and declines itself per partner from
`data/partners.csv` (`variants:`), with the partner's logo and name in the signature:

```yaml title="poster.md"
format: report
variants: ./data/partners.csv
print:
  layout: poster
pdf:
  engine: pagedjs
  page:
    size: A3
    orientation: portrait
    bleed: 3mm
brand:
  logo: "{{logo}}"
  mention: "With the support of {{name}}"
```

A tracked link in the text is written `:link[Explore the kit]{href="https://example.com/{{id}}"}`:
it takes the same `utm:` defaults as `::qr`, without a default `utm_medium`, and `utm="none"` keeps
the address as written. On a poster, the `::qr` code goes to the page footer, with a short caption.

`banner.md` is a short report in `print.layout: banner`: its title, its first `:value` and its first
link become the banner's headline, figure and call to action.

## 5. Validate everything

```bash
recit validate story.md film.md film.fr.md carousel.mdx poster.md banner.md
```

`recit validate` checks every `data:` reference, every `{{…}}` placeholder of every variant, and the
text that would fall outside a preset's safe zone or not fit a banner. Add `--strict` to turn these
warnings into errors before a release.

## 6. Export each support

Each command writes its files and an `exports.json` in its output folder.

```bash
# Six 1080×1920 PNG per preset, in instagram-story/ and tiktok/
recit export story.md --to images --preset instagram-story,tiktok -o out/story

# A six-page square PDF for the carousel, and six 1080×1080 PNG
recit export carousel.mdx --to pdf -o out/carousel-pdf/carousel.pdf
recit export carousel.mdx --to images -o out/carousel-images

# Four MP4: two ratios, two languages, captions burnt in
recit render film.md --aspect 9:16,1:1 --burn-captions --all-locales -o out/film/

# One A3 PDF with bleed per partner: poster.<id>.pdf
recit export poster.md --to pdf --variants -o out/posters

# A 728×90 PNG
recit export banner.md --to images --preset leaderboard -o out/banner
```

A preset whose ratio does not match the story is refused with its reason, never cropped: an
`instagram-post` (4:5) on a `9:16` story, or an `og-image` (1200×628) on a `728×90` banner. Change
the story's `aspectRatio`, or pick a preset of its ratio.

## 7. Show the kit on a site

A site built with `@recit/site` publishes the exports of its stories (`publish.entries[].exports`,
or `recit export --site . --entries`), and an MDX page shows them with `<MediaKit>`: a preview, one
card per file with its channel, its text to copy and its download link, grouped by variant. See
[A media kit](/documentation/integrations/site-stories#a-media-kit).

## Check

- `out/story/exports.json` lists twelve PNG at 1080×1920, each with `preset`, `channel` and `copy`.
- `out/carousel-pdf/carousel.pdf` has six square pages.
- `out/film/` holds `film.9x16.mp4`, `film.1x1.mp4`, `film.fr.9x16.mp4` and `film.fr.1x1.mp4`.
- `out/posters/` holds one `poster.<id>.pdf` per row of `partners.csv`, each naming its partner.
- `out/banner/leaderboard/banner.png` is 728×90.
