@mdit-vue/plugin-frontmatter 0.8.0 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -4
- package/dist/index.d.ts +1 -1
- package/package.json +3 -8
package/README.md
CHANGED
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
|
|
6
6
|
A [markdown-it](https://github.com/markdown-it/markdown-it) plugin to get markdown frontmatter with [gray-matter](https://github.com/jonschlinkert/gray-matter).
|
|
7
7
|
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
8
|
+
- Extracts frontmatter into markdown-it `env.frontmatter`.
|
|
9
|
+
- Allows providing default frontmatter via markdown-it `env.frontmatter`.
|
|
10
|
+
- Extracts markdown content without frontmatter into markdown-it `env.content`.
|
|
11
|
+
- Supports extracting rendered excerpt into markdown-it `env.excerpt`.
|
|
12
12
|
|
|
13
13
|
## Install
|
|
14
14
|
|
|
@@ -37,13 +37,18 @@ const rendered = md.render(
|
|
|
37
37
|
---
|
|
38
38
|
title: foobar
|
|
39
39
|
---
|
|
40
|
+
|
|
40
41
|
Everything above **more** comment will be extracted as excerpt.
|
|
42
|
+
|
|
41
43
|
<!-- more -->
|
|
44
|
+
|
|
45
|
+
Things below **more** comment will not be included in the excerpt.
|
|
42
46
|
`,
|
|
43
47
|
env,
|
|
44
48
|
);
|
|
45
49
|
|
|
46
50
|
console.log(env.frontmatter);
|
|
51
|
+
console.log(env.content);
|
|
47
52
|
console.log(env.excerpt);
|
|
48
53
|
```
|
|
49
54
|
|
package/dist/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mdit-vue/plugin-frontmatter",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.2",
|
|
4
4
|
"description": "A markdown-it plugin to get markdown frontmatter",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"markdown-it",
|
|
@@ -38,18 +38,13 @@
|
|
|
38
38
|
"test": "vitest"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@mdit-vue/types": "0.
|
|
41
|
+
"@mdit-vue/types": "0.9.2",
|
|
42
42
|
"@types/markdown-it": "^12.2.3",
|
|
43
43
|
"gray-matter": "^4.0.3",
|
|
44
44
|
"markdown-it": "^13.0.1"
|
|
45
45
|
},
|
|
46
|
-
"devDependencies": {
|
|
47
|
-
"c8": "^7.12.0",
|
|
48
|
-
"unbuild": "^0.7.6",
|
|
49
|
-
"vitest": "^0.18.1"
|
|
50
|
-
},
|
|
51
46
|
"publishConfig": {
|
|
52
47
|
"access": "public"
|
|
53
48
|
},
|
|
54
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "11b8e8654846fc959d219dbe89f93c62a4b8f109"
|
|
55
50
|
}
|