You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
About `Metadata`, refer to [VFM](https://vivliostyle.github.io/vfm/#/vfm)'s "Frontmatter" or type information of TypeScript.
386
+
About `Metadata` details, refer to [VFM](https://vivliostyle.github.io/vfm/#/vfm)'s "Frontmatter" or type information of TypeScript.
387
+
388
+
**About `excludes`**
389
+
390
+
Use this if want to add custom metadata with a third party tool.
391
+
392
+
Keys that are not defined as VFM are treated as `meta`. If you specify a key name in `excludes`, the key and its data type will be preserved and stored in `excludes` instead of `meta`.
393
+
394
+
```js
395
+
import { readMetadata } from'@vivliostyle/vfm'
396
+
397
+
constmd=`---
398
+
title: 'Title'
399
+
tags: ['foo', 'bar']
400
+
---
401
+
`;
402
+
403
+
constmetadata=readMetadata(md, ['tags']);
404
+
console.log(metadata);
405
+
```
406
+
407
+
Results:
408
+
409
+
```js
410
+
{
411
+
title:'title',
412
+
excludes: {
413
+
tags: ['foo', 'bar']
414
+
}
415
+
}
416
+
```
417
+
418
+
`tags` is stored and retained structure in `excludes` instead of `meta`.
* Keys that are not defined as VFM are treated as `meta`. If you specify a key name in `excludes`, the key and its data type will be preserved and stored in `excludes` instead of `meta`.
247
258
* @param md Markdown.
259
+
* @param excludes A collection of key names to be ignored by meta processing.
0 commit comments