@riebeckite/plugin-docs 0.0.37 → 0.0.39
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/dist/components/docs-sidebar.js +5 -2
- package/dist/index.js +5 -2
- package/package.json +5 -5
|
@@ -170,11 +170,14 @@ var DocsSidebar = (async (props) => {
|
|
|
170
170
|
const options = findDocsOptions(site?.config.plugins);
|
|
171
171
|
const requestedPermalink = props.currentPermalink ?? article?.entry?.permalink ?? site?.path;
|
|
172
172
|
const currentEntry = article?.entry ?? findEntryByPermalink(site?.view, requestedPermalink);
|
|
173
|
+
const navigationEntry = currentEntry ?? site?.manifest.discoverableEntries.find(
|
|
174
|
+
(entry) => (entry.slug === options?.root || entry.slug.startsWith(`${options?.root}/`)) && entry.publicLocation.language === site.language
|
|
175
|
+
);
|
|
173
176
|
const currentPermalink = currentEntry?.permalink ?? requestedPermalink;
|
|
174
|
-
const items = props.items ?? (site &&
|
|
177
|
+
const items = props.items ?? (site && navigationEntry && options ? await getDocsNavigation({
|
|
175
178
|
view: site.view,
|
|
176
179
|
entries: site.manifest.discoverableEntries,
|
|
177
|
-
entrySlug:
|
|
180
|
+
entrySlug: navigationEntry.slug,
|
|
178
181
|
options
|
|
179
182
|
}) : []);
|
|
180
183
|
if (items.length === 0) return html``;
|
package/dist/index.js
CHANGED
|
@@ -256,11 +256,14 @@ var DocsSidebar = (async (props) => {
|
|
|
256
256
|
const options = findDocsOptions2(site?.config.plugins);
|
|
257
257
|
const requestedPermalink = props.currentPermalink ?? article?.entry?.permalink ?? site?.path;
|
|
258
258
|
const currentEntry = article?.entry ?? findEntryByPermalink(site?.view, requestedPermalink);
|
|
259
|
+
const navigationEntry = currentEntry ?? site?.manifest.discoverableEntries.find(
|
|
260
|
+
(entry) => (entry.slug === options?.root || entry.slug.startsWith(`${options?.root}/`)) && entry.publicLocation.language === site.language
|
|
261
|
+
);
|
|
259
262
|
const currentPermalink = currentEntry?.permalink ?? requestedPermalink;
|
|
260
|
-
const items = props.items ?? (site &&
|
|
263
|
+
const items = props.items ?? (site && navigationEntry && options ? await getDocsNavigation({
|
|
261
264
|
view: site.view,
|
|
262
265
|
entries: site.manifest.discoverableEntries,
|
|
263
|
-
entrySlug:
|
|
266
|
+
entrySlug: navigationEntry.slug,
|
|
264
267
|
options
|
|
265
268
|
}) : []);
|
|
266
269
|
if (items.length === 0) return html2``;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riebeckite/plugin-docs",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.39",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
"./style.css": "./style.css"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@riebeckite/core": "0.0.
|
|
31
|
-
"@riebeckite/plugin-navigation": "0.0.
|
|
32
|
-
"@riebeckite/ui": "0.0.
|
|
30
|
+
"@riebeckite/core": "0.0.39",
|
|
31
|
+
"@riebeckite/plugin-navigation": "0.0.39",
|
|
32
|
+
"@riebeckite/ui": "0.0.39",
|
|
33
33
|
"hono": "^4.12.25"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@riebeckite/test": "0.0.
|
|
36
|
+
"@riebeckite/test": "0.0.39",
|
|
37
37
|
"tsx": "^4.22.4"
|
|
38
38
|
},
|
|
39
39
|
"publishConfig": {
|