@riebeckite/plugin-glossary 0.0.35 → 0.0.37

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.
Files changed (2) hide show
  1. package/dist/index.js +13 -0
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -78,6 +78,19 @@ function glossary(options = {}) {
78
78
  title: page.title,
79
79
  body: page.html
80
80
  };
81
+ },
82
+ resolveRoute: ({ manifest, pathname }) => {
83
+ if (pathname !== resolved.basePath || resolved.basePath === "")
84
+ return null;
85
+ const entries = buildGlossary(manifest.discoverableEntries, resolved);
86
+ if (entries.length === 0) return null;
87
+ const page = renderGlossaryPage(entries, resolved);
88
+ return {
89
+ type: "glossary",
90
+ pathname,
91
+ title: page.title,
92
+ body: page.html
93
+ };
81
94
  }
82
95
  }
83
96
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riebeckite/plugin-glossary",
3
- "version": "0.0.35",
3
+ "version": "0.0.37",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -15,7 +15,7 @@
15
15
  "./style.css": "./style.css"
16
16
  },
17
17
  "dependencies": {
18
- "@riebeckite/core": "0.0.35"
18
+ "@riebeckite/core": "0.0.37"
19
19
  },
20
20
  "devDependencies": {
21
21
  "tsx": "^4.22.4"