@@ -69,7 +69,7 @@ internals away.
69
69
## Install
70
70
71
71
This package is [ ESM only] [ esm ] .
72
- In Node.js (version 14.14+ and 16.0 +), install with [ npm] [ ] :
72
+ In Node.js (version 16 +), install with [ npm] [ ] :
73
73
74
74
``` sh
75
75
npm install mdast-util-frontmatter
@@ -105,10 +105,10 @@ title = "New Website"
105
105
106
106
``` js
107
107
import fs from ' node:fs/promises'
108
- import {fromMarkdown } from ' mdast-util-from-markdown'
109
- import {toMarkdown } from ' mdast-util-to-markdown'
110
108
import {frontmatter } from ' micromark-extension-frontmatter'
109
+ import {fromMarkdown } from ' mdast-util-from-markdown'
111
110
import {frontmatterFromMarkdown , frontmatterToMarkdown } from ' mdast-util-frontmatter'
111
+ import {toMarkdown } from ' mdast-util-to-markdown'
112
112
113
113
const doc = await fs .readFile (' example.md' )
114
114
@@ -151,8 +151,8 @@ title = "New Website"
151
151
## API
152
152
153
153
This package exports the identifiers
154
- [ ` frontmatterFromMarkdown ` ] [ api-frontmatterfrommarkdown ] and
155
- [ ` frontmatterToMarkdown ` ] [ api-frontmattertomarkdown ] .
154
+ [ ` frontmatterFromMarkdown ` ] [ api-frontmatter-from-markdown ] and
155
+ [ ` frontmatterToMarkdown ` ] [ api-frontmatter-to-markdown ] .
156
156
There is no default export.
157
157
158
158
### ` frontmatterFromMarkdown(options?) `
@@ -168,7 +168,7 @@ Create an extension for
168
168
###### Returns
169
169
170
170
Extension for ` mdast-util-from-markdown `
171
- ([ ` FromMarkdownExtension ` ] [ frommarkdownextension ] ).
171
+ ([ ` FromMarkdownExtension ` ] [ from-markdown-extension ] ).
172
172
173
173
### ` frontmatterToMarkdown(options?) `
174
174
@@ -183,27 +183,25 @@ Create an extension for
183
183
###### Returns
184
184
185
185
Extension for ` mdast-util-to-markdown `
186
- ([ ` ToMarkdownExtension ` ] [ tomarkdownextension ] ).
186
+ ([ ` ToMarkdownExtension ` ] [ to-markdown-extension ] ).
187
187
188
188
### ` Info `
189
189
190
190
Structure of marker or fence (TypeScript type).
191
191
192
- <!-- To do: fix link when `info` is documented -->
193
-
194
- Same as [ ` Info ` from ` micromark-extension-frontmatter ` ] [ matter ] .
192
+ Same as [ ` Info ` from ` micromark-extension-frontmatter ` ] [ micromark-info ] .
195
193
196
194
### ` Matter `
197
195
198
196
Structure of matter (TypeScript type).
199
197
200
- Same as [ ` Matter ` from ` micromark-extension-frontmatter ` ] [ matter ] .
198
+ Same as [ ` Matter ` from ` micromark-extension-frontmatter ` ] [ micromark- matter] .
201
199
202
200
### ` Options `
203
201
204
202
Configuration (TypeScript type).
205
203
206
- Same as [ ` Options ` from ` micromark-extension-frontmatter ` ] [ options ] .
204
+ Same as [ ` Options ` from ` micromark-extension-frontmatter ` ] [ micromark- options] .
207
205
208
206
## Syntax
209
207
@@ -293,12 +291,15 @@ declare module 'mdast' {
293
291
294
292
## Compatibility
295
293
296
- Projects maintained by the unified collective are compatible with all maintained
294
+ Projects maintained by the unified collective are compatible with maintained
297
295
versions of Node.js.
298
- As of now, that is Node.js 14.14+ and 16.0+.
299
- Our projects sometimes work with older versions, but this is not guaranteed.
300
296
301
- These extensions works with ` mdast-util-from-markdown ` version 1+ and
297
+ When we cut a new major release, we drop support for unmaintained versions of
298
+ Node.
299
+ This means we try to keep the current release line,
300
+ ` mdast-util-frontmatter@^1 ` , compatible with Node.js 12.
301
+
302
+ This utility works with ` mdast-util-from-markdown ` version 1+ and
302
303
` mdast-util-to-markdown ` version 1+.
303
304
304
305
## Related
@@ -336,9 +337,9 @@ abide by its terms.
336
337
337
338
[ downloads ] : https://www.npmjs.com/package/mdast-util-frontmatter
338
339
339
- [ size-badge ] : https://img.shields.io/bundlephobia/minzip/ mdast-util-frontmatter.svg
340
+ [ size-badge ] : https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q= mdast-util-frontmatter
340
341
341
- [ size ] : https://bundlephobia .com/result?p =mdast-util-frontmatter
342
+ [ size ] : https://bundlejs .com/?q =mdast-util-frontmatter
342
343
343
344
[ sponsors-badge ] : https://opencollective.com/unified/sponsors/badge.svg
344
345
@@ -382,9 +383,11 @@ abide by its terms.
382
383
383
384
[ micromark-extension-frontmatter ] : https://github.com/micromark/micromark-extension-frontmatter
384
385
385
- [ options ] : https://github.com/micromark/micromark-extension-frontmatter#options
386
+ [ micromark-info ] : https://github.com/micromark/micromark-extension-frontmatter#info
387
+
388
+ [ micromark-matter ] : https://github.com/micromark/micromark-extension-frontmatter#matter
386
389
387
- [ matter ] : https://github.com/micromark/micromark-extension-frontmatter#matter
390
+ [ micromark-options ] : https://github.com/micromark/micromark-extension-frontmatter#options
388
391
389
392
[ syntax ] : https://github.com/micromark/micromark-extension-frontmatter#syntax
390
393
@@ -394,15 +397,15 @@ abide by its terms.
394
397
395
398
[ term-head ] : https://github.com/syntax-tree/unist#head
396
399
397
- [ frommarkdownextension ] : https://github.com/syntax-tree/mdast-util-from-markdown#extension
400
+ [ from-markdown-extension ] : https://github.com/syntax-tree/mdast-util-from-markdown#extension
398
401
399
- [ tomarkdownextension ] : https://github.com/syntax-tree/mdast-util-to-markdown#options
402
+ [ to-markdown-extension ] : https://github.com/syntax-tree/mdast-util-to-markdown#options
400
403
401
404
[ dfn-frontmatter-content ] : #frontmattercontent
402
405
403
- [ api-frontmatterfrommarkdown ] : #frontmatterfrommarkdownoptions
406
+ [ api-frontmatter-from-markdown ] : #frontmatterfrommarkdownoptions
404
407
405
- [ api-frontmattertomarkdown ] : #frontmattertomarkdownoptions
408
+ [ api-frontmatter-to-markdown ] : #frontmattertomarkdownoptions
406
409
407
410
[ api-info ] : #info
408
411
0 commit comments