-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Document the is_index
property of page objects
#3886
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
base: master
Are you sure you want to change the base?
Conversation
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!
apologies for the force-pushes, I inadvertently included my NixOS packaging of the various mkdocs plugins as part of the original commit |
There was a problem hiding this 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.
@@ -124,6 +124,7 @@ def active(self, value: bool): | |||
|
|||
@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.""" |
There was a problem hiding this comment.
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.
"""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).
There was a problem hiding this comment.
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
".
Unrelated, but For example, - Instructor Guide:
- 'Assessment configuration': 'assessment/index.md' treats "Assessment configuration" as an index page. |
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!