Document the is_index property of page objects#3886
Open
IreneKnapp wants to merge 1 commit intomkdocs:masterfrom
Open
Document the is_index property of page objects#3886IreneKnapp wants to merge 1 commit intomkdocs:masterfrom
is_index property of page objects#3886IreneKnapp wants to merge 1 commit intomkdocs:masterfrom
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!
Author
|
apologies for the force-pushes, I inadvertently included my NixOS packaging of the various mkdocs plugins as part of the original commit |
pawamoy
suggested changes
Dec 24, 2024
Contributor
pawamoy
left a comment
There was a problem hiding this comment.
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.""" |
Contributor
There was a problem hiding this comment.
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).
Contributor
There was a problem hiding this comment.
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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!