Skip to content

Commit

Permalink
Fix pages that are excluded from the sidebar having no sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwooding authored and DavieReid committed Aug 23, 2023
1 parent 0ced179 commit 7013042
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/fast-bulldogs-grab.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@jpmorganchase/mosaic-plugins': patch
---

Fix pages that are excluded from the sidebar having no sidebar
6 changes: 3 additions & 3 deletions packages/plugins/src/SidebarPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,9 @@ const SidebarPlugin: PluginType<SidebarPluginPage, SidebarPluginOptions, Sidebar
await Promise.all(
rootUserJourneys.map(async rootDir => {
const sidebarFilePath = path.posix.join(String(rootDir), filename);
let pages = await createPageList(rootDir);
pages = pages.filter(page => removeExcludedPages(page));
const groupMap = createGroupMap(pages);
const pages = await createPageList(rootDir);
const includedPages = pages.filter(page => removeExcludedPages(page));
const groupMap = createGroupMap(includedPages);

const sidebarData = linkGroupMap(groupMap, rootDir);
if (sidebarData[0] === undefined) {
Expand Down

1 comment on commit 7013042

@vercel
Copy link

@vercel vercel bot commented on 7013042 Aug 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

mosaic – ./

mosaic-mosaic-dev-team.vercel.app
mosaic-git-main-mosaic-dev-team.vercel.app

Please sign in to comment.