@publier/shell 4.3.1 → 4.3.2
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@publier/shell",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.2",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"description": "Qwik + Astro docs layout for Publier sites.",
|
|
6
6
|
"type": "module",
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"@github/details-menu-element": "^1.0.13",
|
|
120
120
|
"@github/relative-time-element": "^5.3.1",
|
|
121
121
|
"@github/tab-container-element": "^4.9.0",
|
|
122
|
-
"@publier/native": "6.0.
|
|
122
|
+
"@publier/native": "6.0.1",
|
|
123
123
|
"@tailwindcss/typography": "^0.5.20",
|
|
124
124
|
"astro-pagefind": "^2.0.1",
|
|
125
125
|
"daisyui": "^5.7.22",
|
|
@@ -14,7 +14,14 @@ export async function getStaticPaths() {
|
|
|
14
14
|
const { entry } = Astro.props;
|
|
15
15
|
const { Content, headings } = await render(entry);
|
|
16
16
|
const all = await getCollection('docs');
|
|
17
|
-
const
|
|
17
|
+
const configuredNav = navConfig.variants.docs;
|
|
18
|
+
const tabSections = [...new Set([
|
|
19
|
+
...docsConfig.tabSections,
|
|
20
|
+
...(configuredNav?.products ?? []).flatMap((product) => (product.tabs ?? []).flatMap((tab) =>
|
|
21
|
+
tab.href?.startsWith('/docs/') ? [tab.href.slice('/docs/'.length).replace(/\/$/, '')] : [],
|
|
22
|
+
)),
|
|
23
|
+
])];
|
|
24
|
+
const plan = JSON.parse(shellPlanDocsSlug(JSON.stringify({ entry_id: entry.id, title: entry.data.title, description: entry.data.description ?? null, tab_sections: tabSections, all_entry_ids: all.map((e) => e.id) }))) as { breadcrumbs: BreadcrumbItem[]; section_entry_ids: string[]; scope: string; current_path: string; sidebar_persist_key: string };
|
|
18
25
|
const pages = all.map((e) => entryToPage({ slug: e.id.replace(/\.(mdx?|md)$/, ''), data: e.data, headings: [] }, { urlPrefix: '/docs' }));
|
|
19
26
|
const sections = [
|
|
20
27
|
...(pages.some((page) => page.url === '/docs') ? [{ label: 'All documentation', href: '/docs' }] : []),
|
|
@@ -25,7 +32,6 @@ const sections = [
|
|
|
25
32
|
}),
|
|
26
33
|
];
|
|
27
34
|
|
|
28
|
-
const configuredNav = navConfig.variants.docs;
|
|
29
35
|
const docsNav: NavVariant = { ...(configuredNav ?? { brand: site.name, logo: site.logo, tabs: sections, links: [], cta: null }) };
|
|
30
36
|
|
|
31
37
|
if (!docsNav.products?.length && docsConfig.versions.length > 0) {
|
package/src/virtual-modules.d.ts
CHANGED
|
@@ -176,9 +176,9 @@ declare module 'virtual:publier-docs-config' {
|
|
|
176
176
|
/** Sidebar levels expanded by default, from sidebar.defaultOpenLevel. */
|
|
177
177
|
defaultOpenLevel?: number;
|
|
178
178
|
/**
|
|
179
|
-
*
|
|
180
|
-
*
|
|
181
|
-
*
|
|
179
|
+
* Paths under `src/content/docs/` that render as tab-scoped sidebars.
|
|
180
|
+
* Nested paths use the longest match. Product tab destinations also
|
|
181
|
+
* supply scopes; an empty array without product tabs uses one sidebar.
|
|
182
182
|
*/
|
|
183
183
|
tabSections: string[];
|
|
184
184
|
/** Display + ordering overrides keyed by group path. */
|