You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having trouble with using multiple .pages files in multiple directories. I have one .pages file in the root directory that's intended to be used for the main navigation, and then another .pages file in a directory called design that's intended to be used for the navigation of the pages within the design section.
Here's the folder directory:
/docs
.pages
/design
.pages
And here's what the .pages files look like. This is the first one, in the root /docs directory:
And here's the content in the .pages file within the design directory:
nav:
- Introduction: general
- Book Design: book_design
- Figure Design: figure_design
The issue is when I click on the Design link in the top nav on my website, it goes to the design/general location. What I'm hoping to have it do is instead go to the design/index.md file, and then once the Introduction link in Design is clicked, then it goes to the design/general location.
Does anyone have any idea how I can it to function like this?
Thank you!!!
The text was updated successfully, but these errors were encountered:
nav:
- index.md
- Introduction: general
- Book Design: book_design
- Figure Design: figure_design
or if you're using the i18n plugin:
nav:
- ... | index*.md
- Introduction: general
- Book Design: book_design
- Figure Design: figure_design
I'm using the material theme with index pages and navigation tabs features on, together with the i18n plugin:
For the top level (root -> tab) I have to use the third method in the tab directories to directly set index at the top.
Apart of that in deeper directories I just use ... in the nav and it does include the index at the top.
It breaks at the navigation tab level since it's a feature of the material theme that could get the link before the ... is processed by the plugin 🤔, but I never investigated it 🤷.
EDIT: I removed the copy-paste typo example, which I later explain doesn't work 😅
MkDocs always navigates to the first page of a section (folder). Therefore, as @kamilkrzyskow suggested, you need some sort of index page if you don't want users to go straight to the introduction.
@jeffjg I assume your question has been answered and this issue can be closed?
Hello!
I'm having trouble with using multiple
.pages
files in multiple directories. I have one.pages
file in the root directory that's intended to be used for the main navigation, and then another.pages
file in a directory calleddesign
that's intended to be used for the navigation of the pages within the design section.Here's the folder directory:
And here's what the .pages files look like. This is the first one, in the root
/docs
directory:And here's the content in the .pages file within the
design
directory:The issue is when I click on the Design link in the top nav on my website, it goes to the
design/general
location. What I'm hoping to have it do is instead go to thedesign/index.md
file, and then once theIntroduction
link in Design is clicked, then it goes to thedesign/general
location.Does anyone have any idea how I can it to function like this?
Thank you!!!
The text was updated successfully, but these errors were encountered: