# @cms-lab/contentful

> Contentful document adapter for cms-lab.

Latest version **1.3.0** (published 2026-05-31) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @cms-lab/contentful
pnpm add @cms-lab/contentful
yarn add @cms-lab/contentful
bun add @cms-lab/contentful
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.3.0 |
| Published | 2026-05-31 |
| First published | 2026-05-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | >=20.10 |
| Dependencies | 1 |
| Unpacked size | 8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| Author | Afaq Rashid |
| Maintainers | afaqrashid |
| Keywords | cms, contentful, testing |

## Links

- npm: https://www.npmjs.com/package/@cms-lab/contentful
- Repository: https://github.com/i-afaqrashid/cms-lab
- Homepage: https://cmslab.afaqrashid.com
- Issues: https://github.com/i-afaqrashid/cms-lab/issues
- npm.io page: https://npm.io/package/@cms-lab/contentful

## Dependencies (1)

- [@cms-lab/core](https://npm.io/package/@cms-lab/core.md) 1.3.0

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads

## Recent versions

- 1.3.0 (latest) — 2026-05-31
- 1.2.6 — 2026-05-26
- 1.2.5 — 2026-05-26
- 1.2.4 — 2026-05-26
- 1.2.3 — 2026-05-26
- 1.2.2 — 2026-05-26
- 1.2.1 — 2026-05-26
- 1.2.0 — 2026-05-26
- 1.1.0 — 2026-05-26
- 1.0.10 — 2026-05-26
- 1.0.9 — 2026-05-25
- 1.0.8 — 2026-05-25
- 1.0.6 — 2026-05-25
- 1.0.5 — 2026-05-25

## README

# @cms-lab/contentful

Contentful adapter for cms-lab.

```ts
cms: {
  provider: "contentful",
  spaceId: "my-space",
  environment: "master",
  accessToken: process.env.CONTENTFUL_DELIVERY_TOKEN!,
  contentTypes: [
    {
      type: "page",
      contentType: "page",
      uidField: "routing.slug",
      urlField: "routing.url",
    },
  ],
}
```

The adapter reads Contentful Content Delivery API entries, paginates with
`limit` and `skip`, and normalizes them into cms-lab `CMSDocument` objects.
Top-level localized fields are flattened to the default locale when possible so
route mappings can use common fields such as `doc.uid` or `doc.data.slug`.

Use `uidField` or `urlField` when your project stores route values in custom
fields. Both options read dotted paths from normalized `document.data`.

See the public [adapter maturity matrix](https://cmslab.afaqrashid.com/docs/tested-with)
for current test coverage and known limits.

## Release History

See the repository [changelog](https://github.com/i-afaqrashid/cms-lab/blob/main/CHANGELOG.md)
and [GitHub Releases](https://github.com/i-afaqrashid/cms-lab/releases) for
version-by-version notes.

## Open Source

MIT licensed. See the repository [license](https://github.com/i-afaqrashid/cms-lab/blob/main/LICENSE), [contributing guide](https://github.com/i-afaqrashid/cms-lab/blob/main/CONTRIBUTING.md), and [support guide](https://github.com/i-afaqrashid/cms-lab/blob/main/SUPPORT.md).

---
_Source: https://npm.io/package/@cms-lab/contentful · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
