Add support for sections with pages
See original GitHub issueCurrently, a parent nav item (one which contains children) cannot have a page attached to it, as stated in the MkDocs documentation.
This means that in the following navigation structure, I can’t link from other topics to the general “Products” page, which is inconvenient:
nav:
- Home: index.md
- Products:
- Product A: product-a.md
- Product B: product-a.md
- Support: support.md
However, as @waylan pointed out in this comment, this could be overriden by a template.
It would be great if material supported waylan’s suggested implementation.
Issue Analytics
- State:
- Created 5 years ago
- Comments:14 (13 by maintainers)
Top Results From Across the Web
Add and format sections in Pages on Mac - Apple Support
Add a blank section after the current section · In Page Thumbnails view, select any page in a section. · Open the Document...
Read more >Create pages, sections, or notebooks in OneNote for Mac
At the bottom of the vertical section list, click Add section. On your keyboard, press Command + T. Type a name for the...
Read more >Add Sections to Your Pages in Square Online
Click the Add section button to view more sections. Scroll through the list and click on any section to see a preview on...
Read more >Page sections - Squarespace Help Center
Add and edit sections · Click Add Section above or below an existing section. · Click a category in the left panel to...
Read more >Motion Support: How do I add sections to Pages?
Create a new Page, add a title, and switch the Template setting on the right to page.sections (how to assign a page template)...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Typically, yes. But our doc site has a super uncommonly low amount of mobile users (around 1.2%), mainly because it’s usually accessed from a desktop app. So we might think different about that. It always depends.
Anyway, thanks for the insight and the discussion!
Haha that’s the point. Good UX is very hard 😉 Personally I think that collapsibility of sections (especially on mobile) outweighs the need to put your content in a separate page (coming first) in your section. Otherwise mobile navigation might be a lot of scrolling, which can be quite A LOT for huge documentation projects. I currently solve this problem by naming the first page within a section “Overview” or something similar.
It’s always a trade-off, no matter which way you look.
EDIT: Also, note that we would need to implement this as an optional thing, because making it mandatory would mean that there will always need to be an index page. Some people might argue that they don’t want that, because content is mutually exclusive aaaaand we’re back to square one. However, making it optional would only lead to more confusion. I think we should just leave it as it is. If one wants to change it, theme extension is always a possibility.