# @egvelho/next-meta

> Metadata management for Next.js on top of NetlifyCMS

Latest version **1.16.15** (published 2025-04-08) · GPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install @egvelho/next-meta
pnpm add @egvelho/next-meta
yarn add @egvelho/next-meta
bun add @egvelho/next-meta
```

Provides the commands `generate-assets`, `resize-image-assets`.

## Health

**Score 30/100 (F)** — status: maintenance-mode.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.16.15 |
| Published | 2025-04-08 |
| First published | 2021-10-03 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 13 |
| Unpacked size | 182.9 KB |
| Known vulnerabilities | 0 (+27 in 3 direct dependencies) |
| Install scripts | no |
| Author | eduardavelho |
| Maintainers | egvelho |

## Links

- npm: https://www.npmjs.com/package/@egvelho/next-meta
- npm.io page: https://npm.io/package/@egvelho/next-meta

## Dependencies (13)

- [slug](https://npm.io/package/slug.md) ^5.1.0
- [axios](https://npm.io/package/axios.md) ^0.21.1
- [sharp](https://npm.io/package/sharp.md) ^0.29.0
- [tslib](https://npm.io/package/tslib.md) ^2.3.1
- [cheerio](https://npm.io/package/cheerio.md) 1.0.0-rc.10
- [sitemap](https://npm.io/package/sitemap.md) ^7.0.0
- [unified](https://npm.io/package/unified.md) ^9.2.2
- [favicons](https://npm.io/package/favicons.md) ^6.2.2
- [netlify-cms](https://npm.io/package/netlify-cms.md) ^2.10.158
- [remark-html](https://npm.io/package/remark-html.md) ^12.0.0
- [remark-parse](https://npm.io/package/remark-parse.md) ^9.0.0
- [netlify-cms-core](https://npm.io/package/netlify-cms-core.md) ^2.47.2
- [remark-highlight.js](https://npm.io/package/remark-highlight.js.md) ^6.0.0

## Recent versions

- 1.16.15 (latest) — 2025-04-08
- 1.16.14 — 2022-09-04
- 1.16.13 — 2022-05-29
- 1.16.11 — 2022-05-09
- 1.16.10 — 2022-03-14
- 1.16.9 — 2022-02-15
- 1.16.8 — 2022-02-15
- 1.16.7 — 2022-02-15
- 1.16.6 — 2021-10-05
- 1.16.5 — 2021-10-04
- 1.16.4 — 2021-10-03

## README

# A static data management layer for Next.js

This package provides an improved programming experience for using NetlifyCMS with Next.js. Also, it provides tools to manage assets (images, icons, manifests) and HTML metadata.
Please refer to this [project](https://github.com/eduardavelho/next-material-netlify-cms-blog) for some usage examples.

# What is inside the box?

* Generate PWA icons based on a single SVG file;
* Improved programming experience for NetlifyCMS and Next.js;
* Components with sensible defaults for HTML metadata;
* Tools for handling JSON files.

# A blog post example

```typescript
import {
  collectionFolder,
  GetCollectionType,
} from "@egvelho/next-meta/cms/collection";

export type BlogPost = GetCollectionType<typeof blogPost>;

export const blogPost = collectionFolder({
  folder: "app/blog/posts",
  label: "Blog posts",
  labelSingular: "post",
  slug: "{{title}}",
  sortableFields: ["publishDate"],
}).fields((data) => ({
  title: data.string({
    label: "Title",
  }),
  description: data.string({
    label: "Description",
  }),
  image: data.image({
    label: "Image",
  }),
  publishDate: data.datetime<"optional">({
    label: "Publish date",
    dateFormat: "MM/YYYY",
    timeFormat: "HH:mm",
    required: false,
  }),
  tags: data.keywords({
    label: "Tags",
    min: 1,
    max: 5,
  }),
  authorName: data.string<"optional">({
    label: "Author name",
    required: false,
  }),
  authorDescription: data.string<"optional">({
    label: "Author description",
    required: false,
  }),
  authorPicture: data.image<"optional">({
    label: "Author picture",
    required: false,
  }),
  titleColor: data.color<"optional">({
    label: "Title color",
    required: false,
    allowInput: true,
  }),
  backgroundColor: data.color<"optional">({
    label: "Background color",
    required: false,
    allowInput: true,
  }),
  backgroundImage: data.image<"optional">({
    label: "Background image",
    required: false,
  }),
  content: data.markdown({
    label: "Content",
  }),
}));
```

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