# contentlayerdev/contentlayer

Contentlayer turns your content into data - making it super easy to import MD(X) and CMS content in your app

Repository: https://github.com/contentlayerdev/contentlayer
Canonical: https://ross.abutalabs.com/products/contentlayer
Homepage: https://www.contentlayer.dev
Language: TypeScript
License: MIT
License Family: permissive
Last push: 2024-11-07T07:51:24+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 2051, "days_push": 664, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3536, forks 193 (observed 2026-08-28T04:08:09.072506+00:00)

## What it is
Contentlayer is a content SDK that validates and transforms Markdown, MDX, and CMS content into type-safe JSON data you can import directly into your JavaScript/TypeScript application. It offers deep Next.js integration via the next-contentlayer plugin, with a CLI and pluggable content sources such as local files and Notion.

## Use cases
- build a type-safe blog with markdown in Next.js
- import MDX content as typed data in my app
- validate frontmatter and generate TypeScript types for content
- use Notion as a CMS for a Next.js site
- speed up static site builds with incremental content processing
- turn local markdown files into queryable JSON documents

## When to choose
- you build a Next.js (or similar JS) site with local Markdown/MDX content
- you want type-safe, validated content without learning a query language
- you need fast incremental builds and live reload for content-heavy sites

## When to avoid
- you need a framework other than Next.js - Remix, Astro, SvelteKit, and Vite support is only 'considered'
- you need production CMS sources like Contentful or Sanity, which are experimental or planned
- you need a project under heavy active development - the project is in beta/maintenance with known problems

## Facets
- artifact type: library
- maturity: maintenance
- function: build-tool, parser, serialization, type-system, cli, plugin-system
- domain: web-development, frontend, developer-tools, documentation, cms
- platform: cli
- tags: mdx, markdown, content-sdk, nextjs, type-safe-content, static-content, jamstack, content-pipeline, nodejs, typescript, web-server

## Member repositories
- contentlayerdev/contentlayer (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:09.072506+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:35:02.474543+00:00, confidence not recorded.
  - readme: https://github.com/contentlayerdev/contentlayer (fetched 2026-08-28T04:08:09.072506+00:00, sha c873195a5330)
  - homepage: https://www.contentlayer.dev (fetched 2026-08-29T09:29:25.565909+00:00, sha 349199af6851)
  - site_page: https://contentlayer.dev/docs (fetched 2026-08-29T09:29:25.575593+00:00, sha 68b0bdbc6d1d)
  - site_page: https://contentlayer.dev/docs/getting-started (fetched 2026-08-29T09:29:25.577884+00:00, sha 1514f05751b2)
  - site_page: https://contentlayer.dev/docs/environments/nextjs (fetched 2026-08-29T09:29:25.580137+00:00, sha 9eeab03efb41)
  - site_page: https://contentlayer.dev/docs/environments/remix (fetched 2026-08-29T09:29:25.582160+00:00, sha 4e5b7e6b7f61)
  - site_page: https://contentlayer.dev/docs/environments/vite (fetched 2026-08-29T09:29:25.584236+00:00, sha 49b8a001944d)
  - site_page: https://contentlayer.dev/docs/environments/astro (fetched 2026-08-29T09:29:25.585945+00:00, sha 618bb57440eb)
  - site_page: https://contentlayer.dev/docs/sources/files (fetched 2026-08-29T09:29:25.587442+00:00, sha fdb9170b2490)
  - site_page: https://contentlayer.dev/docs/sources/notion (fetched 2026-08-29T09:29:25.588974+00:00, sha f8f03e6d6860)
- Data as of 2026-08-30T08:39:29.467469+00:00.
