@riebeckite/plugin-docs 0.0.30 → 0.0.31

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.
@@ -150,11 +150,11 @@ function titleFromSegment(segment) {
150
150
  }
151
151
 
152
152
  // src/data.ts
153
- var getDocsNavigation = ({ view, entrySlug, options }) => {
153
+ var getDocsNavigation = ({ view, entries, entrySlug, options }) => {
154
154
  const entry = view.findRoutableBySlug(entrySlug);
155
155
  if (!entry) return [];
156
- const localized = view.discoverableEntries.filter(
157
- (candidate) => candidate.publicLocation.language === entry.publicLocation.language
156
+ const localized = entries.filter(
157
+ (candidate) => candidate.publishing.discoverable && candidate.publicLocation.language === entry.publicLocation.language
158
158
  );
159
159
  return buildDocsNavigation(localized, resolveDocsOptions(options));
160
160
  };
@@ -167,6 +167,7 @@ var DocsSidebar = (async (props) => {
167
167
  const options = findDocsOptions(site?.config.plugins);
168
168
  const items = props.items ?? (site && article?.entry && options ? await getDocsNavigation({
169
169
  view: site.view,
170
+ entries: site.manifest.discoverableEntries,
170
171
  entrySlug: article.entry.slug,
171
172
  options
172
173
  }) : []);
package/dist/index.js CHANGED
@@ -163,11 +163,11 @@ import { useArticleContext, useSiteContext } from "@riebeckite/ui";
163
163
  import { html } from "hono/html";
164
164
 
165
165
  // src/data.ts
166
- var getDocsNavigation = ({ view, entrySlug, options }) => {
166
+ var getDocsNavigation = ({ view, entries, entrySlug, options }) => {
167
167
  const entry = view.findRoutableBySlug(entrySlug);
168
168
  if (!entry) return [];
169
- const localized = view.discoverableEntries.filter(
170
- (candidate) => candidate.publicLocation.language === entry.publicLocation.language
169
+ const localized = entries.filter(
170
+ (candidate) => candidate.publishing.discoverable && candidate.publicLocation.language === entry.publicLocation.language
171
171
  );
172
172
  return buildDocsNavigation(localized, resolveDocsOptions(options));
173
173
  };
@@ -189,6 +189,7 @@ var DocsPrevNext = (async (props) => {
189
189
  const options = findDocsOptions(site?.config.plugins);
190
190
  const navigation = site && article?.entry && options ? await getDocsNavigation({
191
191
  view: site.view,
192
+ entries: site.manifest.discoverableEntries,
192
193
  entrySlug: article.entry.slug,
193
194
  options
194
195
  }) : [];
@@ -252,6 +253,7 @@ var DocsSidebar = (async (props) => {
252
253
  const options = findDocsOptions2(site?.config.plugins);
253
254
  const items = props.items ?? (site && article?.entry && options ? await getDocsNavigation({
254
255
  view: site.view,
256
+ entries: site.manifest.discoverableEntries,
255
257
  entrySlug: article.entry.slug,
256
258
  options
257
259
  }) : []);
@@ -1,7 +1,8 @@
1
- import type { PluginDataHelper, PublicContentView } from "@riebeckite/core";
1
+ import type { ContentManifestEntry, PluginDataHelper, PublicContentView } from "@riebeckite/core";
2
2
  import type { DocsNavigationItem, DocsNavigationLink, DocsOptions } from "./types.js";
3
3
  export declare const getDocsNavigation: PluginDataHelper<{
4
4
  view: PublicContentView;
5
+ entries: readonly ContentManifestEntry[];
5
6
  entrySlug: string;
6
7
  options: DocsOptions;
7
8
  }, readonly DocsNavigationItem[]>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riebeckite/plugin-docs",
3
- "version": "0.0.30",
3
+ "version": "0.0.31",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -28,12 +28,12 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "hono": "^4.12.25",
31
- "@riebeckite/core": "0.0.30",
32
- "@riebeckite/ui": "0.0.30"
31
+ "@riebeckite/core": "0.0.31",
32
+ "@riebeckite/ui": "0.0.31"
33
33
  },
34
34
  "devDependencies": {
35
35
  "tsx": "^4.22.4",
36
- "@riebeckite/test": "0.0.30"
36
+ "@riebeckite/test": "0.0.31"
37
37
  },
38
38
  "publishConfig": {
39
39
  "access": "public"