Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example for menu with subdirectories #634

Open
LasseKrache opened this issue Jul 22, 2024 · 1 comment
Open

Example for menu with subdirectories #634

LasseKrache opened this issue Jul 22, 2024 · 1 comment

Comments

@LasseKrache
Copy link

LasseKrache commented Jul 22, 2024

Hello,

As I am new to hugo and hugo-book this is probably not an error or issue ... it is just a stupid question.

I am unable to get the menu with the correct entries with this content:

/computer
/computer/hardware

  • printer.md
  • scanner.md
  • ...

/computer/software

/computer/software/windows

  • office.md
  • sap.md
  • adobe.md
  • ...

/computer/software/linux

  • ...

I would like a menu with the entries "software" and "hardware" and beneath software the entry "windows" and so on.

What I get is a list of ALL md files in one row when I use
BookSection = '*'
I guess there is another option that needs to be set ... but which one? Can someone post an example of a configuration, which works as descibed?

Any help would be very appreciated!
Lasse

@alex-shpak
Copy link
Owner

Hi! You can turn pages into leaf nodes, so they don't show pages under them
/computer/hardware/index.md
/computer/software/index.md

or you can go thought pages under them and set bookHidden: true property to hide them from the menu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants