Gathering detailed insights and metrics for remark-mdx-frontmatter
Gathering detailed insights and metrics for remark-mdx-frontmatter
Gathering detailed insights and metrics for remark-mdx-frontmatter
Gathering detailed insights and metrics for remark-mdx-frontmatter
@allenlee/remark-mdx-frontmatter
A remark-mdx-frontmatter fork
remark-mdx-next
A remark plugin for converting frontmatter metadata into MDX exports
remark-mdx-frontmatter-nextjs
remark-mdx plugin to pass frontmatter data to nextjs page props
remark-next-mdx-frontmatter
This module allows you to use `Frontmatter` with [`@next/mdx`](https://nextjs.org/docs/advanced-features/using-mdx#nextmdx) which doesn't officially support frontmatter.
A remark plugin for converting frontmatter metadata into MDX exports
npm install remark-mdx-frontmatter
Typescript
Module System
Node Version
NPM Version
97.9
Supply Chain
98.2
Quality
82.3
Maintenance
100
Vulnerability
100
License
JavaScript (65.57%)
TypeScript (34.43%)
Total Downloads
45,522,838
Last Day
23,175
Last Week
479,636
Last Month
2,042,436
Last Year
22,211,985
MIT License
127 Stars
106 Commits
7 Forks
3 Watchers
1 Branches
2 Contributors
Updated on Jun 26, 2025
Minified
Minified + Gzipped
Latest Version
5.2.0
Package Id
remark-mdx-frontmatter@5.2.0
Unpacked Size
13.55 kB
Size
4.44 kB
File Count
13
NPM Version
11.3.0
Node Version
24.1.0
Published on
Jun 04, 2025
Cumulative downloads
Total Downloads
Last Day
-14.7%
23,175
Compared to previous day
Last Week
-7.3%
479,636
Compared to previous week
Last Month
0.4%
2,042,436
Compared to previous month
Last Year
43.3%
22,211,985
Compared to previous year
A remark plugin for converting frontmatter metadata into MDX exports
This package depends on the AST output by remark-frontmatter
1npm install remark-frontmatter remark-mdx-frontmatter
This remark plugin takes frontmatter content, and outputs it as JavaScript exports. Both YAML and TOML frontmatter data are supported.
For example, given a file named example.mdx
with the following contents:
1--- 2hello: frontmatter 3--- 4 5Rest of document
The following script:
1import { readFile } from 'node:fs/promises' 2 3import { compile } from '@mdx-js/mdx' 4import remarkFrontmatter from 'remark-frontmatter' 5import remarkMdxFrontmatter from 'remark-mdx-frontmatter' 6 7const { value } = await compile(await readFile('example.mdx'), { 8 jsx: true, 9 remarkPlugins: [remarkFrontmatter, remarkMdxFrontmatter] 10}) 11console.log(value)
Roughly yields:
1export const frontmatter = { 2 hello: 'frontmatter' 3} 4 5export default function MDXContent() { 6 return <p>Rest of document</p> 7}
The default export is a remark plugin.
default
: The default value to export if no frontmatter data is found. (Default: undefined
).name
: The identifier name of the variable the frontmatter data is assigned to. (Default:
frontmatter
).parsers
: A mapping A mapping of node types to parsers. Each key represents a frontmatter node
type. The value is a function that accepts the frontmatter data as a string, and returns the
parsed data. By default yaml
nodes will be parsed using yaml
and toml
nodes using toml
.In addition it supports unist-util-mdx-define
options.
This project is compatible with Node.js 18 or greater.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
15 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
packaging workflow detected
Details
Reason
1 existing vulnerabilities detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 5
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-06-23
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More