Open develmusa opened 2 months ago
To achieve a clickable directory title, an index.md file must be added to the directory.
That's not actually the default behavior of MkDocs, are you using mkdocs-material
and have navigation.indexes
turned on by any chance?
In any case, I'm afraid such a feature is out of scope for this plugin. Changing what happens when you click a section depends on the theme and this plugin is purely about creating the navigation structure.
As mentioned above, mkdocs-material
has an option to make section headers navigate to the index page, but as far as I can tell it only works with index.md
.
An alternative might be mkdocs-section-index
. Even though in the documentation they're also using index.md
, it seems that it takes the first page in the navigation if it doesn't have a title.
Description:
I would like to request a feature enhancement for the
mkdocs-awesome-pages-plugin
that allows directory titles in the navigation to be directly clickable and link to a specific Markdown file within that directory.Current Behavior:
Currently, when using the plugin without defining
nav
in themkdocs.yml
file, directory titles appear in the navigation, but they are not directly clickable. To achieve a clickable directory title, anindex.md
file must be added to the directory. However, this approach has limitations:index.md
file may interfere with existing wikilinks or other internal linking structures.overview.md
) being listed separately in the navigation.Proposed Feature:
Introduce an option in the
.pages
file that allows the directory title to be clickable and link directly to a specific Markdown file (likeoverview.md
) within that directory without requiring anindex.md
file or manually defining thenav
inmkdocs.yml
.For example, in the
.pages
file:Benefits:
Avoids redundant entries and improves usability when organizing content.
Use Case Example:
Given a structure like:
I would like the "Overview" title in the navigation to be clickable and link directly to
overview.md
without needing anindex.md
file and without explicitly defining the nav inmkdocs.yml
.