Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

IreneKnapp
Copy link

I was told on #3882 that this is likely to be a stable interface and that there's no reason it shouldn't be documented as such, so I'm submitting this PR to do that.

Thanks in advance!

I was told on mkdocs#3882 that this is
likely to be a stable interface and that there's no reason it shouldn't
be documented as such, so I'm submitting this PR to do that.

Thanks in advance!
@IreneKnapp
Copy link
Author

apologies for the force-pushes, I inadvertently included my NixOS packaging of the various mkdocs plugins as part of the original commit

Copy link
Collaborator

@pawamoy pawamoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries, and thanks! Just one comment.


@property
def is_index(self) -> bool:
"""When `True`, indicates that this page is an index page, in the sense that it gets sorted to the beginning of the list of its siblings because its filename was `index.md` or something similar."""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels a bit long for a summary.

Suggested change
"""When `True`, indicates that this page is an index page, in the sense that it gets sorted to the beginning of the list of its siblings because its filename was `index.md` or something similar."""
"""When `True`, indicates that this page is an index page.
Index pages get sorted to the beginning of the list of their siblings
because their filename is `index.md` or `README.md`.
"""

Actually not entirely sure about README.md. I think @tomchristie would be able to confirm (and maybe rephrase to something better).

Copy link
Collaborator

@pawamoy pawamoy Dec 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could just drop "or README.md".

@reteps
Copy link

reteps commented Feb 14, 2025

Unrelated, but is_index currently could have improved handling. See squidfunk/mkdocs-material#7561

For example,

- Instructor Guide:
  - 'Assessment configuration': 'assessment/index.md'

treats "Assessment configuration" as an index page.

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

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.