@riebeckite/plugin-permalink 0.0.17 → 0.0.19

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
@@ -961,6 +961,6 @@ permalink({
961
961
 
962
962
  # See also
963
963
 
964
- - [Plugin guide](../../../docs/en/docs/reference/plugin-api.md)
965
- - [Content system](../../../docs/en/docs/framework/content-system.md)
964
+ - [Plugin guide](../../../docs/docs/reference/plugin-api.en.md)
965
+ - [Content system](../../../docs/docs/framework/content-system.en.md)
966
966
 
package/README_ja.md CHANGED
@@ -977,6 +977,6 @@ permalink({
977
977
 
978
978
  ## 関連資料
979
979
 
980
- - [プラグインシステム](../../../docs/ja/docs/reference/plugin-api.md)
981
- - [コンテンツシステム](../../../docs/ja/docs/framework/content-system.md)
980
+ - [プラグインシステム](../../../docs/docs/reference/plugin-api.md)
981
+ - [コンテンツシステム](../../../docs/docs/framework/content-system.md)
982
982
 
package/dist/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  // index.ts
2
2
  import { createHash } from "node:crypto";
3
3
  import {
4
+ attachErrorPath,
4
5
  definePlugin
5
6
  } from "@riebeckite/core";
6
7
  import { parse } from "yaml";
@@ -94,7 +95,12 @@ function parseFrontmatter(entry) {
94
95
  /^(?:\uFEFF)?---\s*\r?\n([\s\S]*?)\r?\n---\s*(?:\r?\n|$)/
95
96
  );
96
97
  if (!match) return {};
97
- const value = parse(match[1] ?? "");
98
+ let value;
99
+ try {
100
+ value = parse(match[1] ?? "");
101
+ } catch (error) {
102
+ throw attachErrorPath(error, entry.path);
103
+ }
98
104
  if (value === null || typeof value !== "object" || Array.isArray(value)) {
99
105
  throw new Error(`Invalid frontmatter object: ${entry.path}`);
100
106
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riebeckite/plugin-permalink",
3
- "version": "0.0.17",
3
+ "version": "0.0.19",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -15,11 +15,11 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "yaml": "^2.9.0",
18
- "@riebeckite/core": "0.0.17"
18
+ "@riebeckite/core": "0.0.19"
19
19
  },
20
20
  "devDependencies": {
21
21
  "tsx": "^4.22.4",
22
- "@riebeckite/test": "0.0.17"
22
+ "@riebeckite/test": "0.0.19"
23
23
  },
24
24
  "publishConfig": {
25
25
  "access": "public"