@mdit-vue/plugin-frontmatter 0.7.1 → 0.9.1

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 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
- - Extract frontmatter into markdown-it `env.frontmatter`.
9
- - Allow providing default frontmatter via markdown-it `env.frontmatter`.
10
- - Extract markdown content without frontmatter into markdown-it `env.content`.
11
- - Support extracting rendered excerpt into markdown-it `env.excerpt`.
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
@@ -42,7 +42,7 @@ declare module '@mdit-vue/types' {
42
42
  /**
43
43
  * Get markdown frontmatter and excerpt
44
44
  *
45
- * Extract them to env
45
+ * Extract them into env
46
46
  */
47
47
  declare const frontmatterPlugin: PluginWithOptions<FrontmatterPluginOptions>;
48
48
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mdit-vue/plugin-frontmatter",
3
- "version": "0.7.1",
3
+ "version": "0.9.1",
4
4
  "description": "A markdown-it plugin to get markdown frontmatter",
5
5
  "keywords": [
6
6
  "markdown-it",
@@ -38,7 +38,7 @@
38
38
  "test": "vitest"
39
39
  },
40
40
  "dependencies": {
41
- "@mdit-vue/types": "0.7.1",
41
+ "@mdit-vue/types": "0.9.0",
42
42
  "@types/markdown-it": "^12.2.3",
43
43
  "gray-matter": "^4.0.3",
44
44
  "markdown-it": "^13.0.1"
@@ -46,10 +46,10 @@
46
46
  "devDependencies": {
47
47
  "c8": "^7.12.0",
48
48
  "unbuild": "^0.7.6",
49
- "vitest": "^0.18.1"
49
+ "vitest": "^0.19.1"
50
50
  },
51
51
  "publishConfig": {
52
52
  "access": "public"
53
53
  },
54
- "gitHead": "b4b8bc6c054ea2dd9ad9ec7a37a58b5a2147b2bd"
54
+ "gitHead": "8f7879b6a317cbae2f28d7f5cf563715387f7089"
55
55
  }