Skip to content

Commit

Permalink
fix: doc index page remove from doc pages
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Feb 22, 2021
1 parent a5d83b2 commit f4ccf7b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/routes/src/routes/docs-pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
defDocType,
DocType,
getHomePath,
getDocTypePath,
getRoutePath,
Pages,
getDocPath,
Expand Down Expand Up @@ -76,12 +77,14 @@ export const getDocPages = (store: Store): DocPagesPath[] => {
if (!categories.includes(type as DocType)) {
const page = pages[type as DocType];
const docType = type as DocType;
const docHomePath = getDocTypePath(store, page.basePath) as string;
const docs: Pages = getPageList(store, docType);
const tabs = getPageTabs(page);
tabs.forEach((tab, tabIndex) => {
const route = tabIndex > 0 ? tab : undefined;
docs.forEach(doc => {
if (getRoutePath(store, doc.route) !== homePath) {
const pagePath = getRoutePath(store, doc.route);
if (pagePath !== homePath && pagePath !== docHomePath) {
const stories =
page.sideNav?.storyPaths && doc.stories?.length
? doc.stories
Expand Down

0 comments on commit f4ccf7b

Please sign in to comment.