Skip to content

Commit

Permalink
fix: render chapters in the menu
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Ellison committed Aug 25, 2023
1 parent d033112 commit 864e6b3
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions components/content/ContentPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -252,26 +252,24 @@ function ContentMenu({ content, file, handleContentChange, handlePageReset, cont
if (content && content[directory]) {
for (let collectionItem of context.collections) {
if (content[directory][collectionItem]) {
// console.log('ContentMenu:collectionItem: ', collectionItem)
chaptersMenu.push(
{
groupTitle: collectionItem.path,
groupTitle: collectionItem,
links: content[directory][collectionItem]
}
)
}
}




// if (content[directory].chapters) {
// chaptersMenu.push(
// {
// groupTitle: "Chapters",
// links: content[directory].chapters
// }
// )
// }
if (content[directory].chapters) {
chaptersMenu.push(
{
groupTitle: "Chapters",
links: content[directory].chapters
}
)
}
// if (content[directory].knowledge) {
// chaptersMenu.push(
// {
Expand Down

0 comments on commit 864e6b3

Please sign in to comment.