Skip to content
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

Use prune when rendering toctree to respect maxdepth #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bartek
Copy link

@bartek bartek commented Aug 24, 2018

Note: I'm not well versed in the toctree creation here, but this change helped me get maxdepth be respected for the output. Perhaps this could be added as a configuration variable, but unsure how to do that (I can explore, but want to submit this change first to begin the conversation)


Prior to this, maxdepth was never respected and all headings within a document would be shown in the toctree. Now, we can have headings beyond the title in the document, that are not shown in the toctree (unless otherwise demanded through the use of maxdepth)

Prior to this, maxdepth was never respected and all headings within a document would be shown in the toctree. Now, we can have headings beyond the title in the document, that are not shown in the toctree (unless otherwise demanded through the use of `maxdepth`)
@KSchopmeyer
Copy link

Since there has been no action on this pr for over a year I was wondering if anybody is interested int it. We are. We like the ability to see the full toc. However since we have up to 4 levels of TOC, the sidebar gets very busy.

@bartek
Copy link
Author

bartek commented Nov 23, 2019

@KSchopmeyer I feel as if this project needs a new maintainer. @electrofelix are you looking to maintain this project or do you need help? Would be happy to support!

Copy link
Collaborator

@electrofelix electrofelix left a comment

Choose a reason for hiding this comment

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

Seems reasonable, sorry not really making enough use of this these days to remember to check back here.

@electrofelix
Copy link
Collaborator

@dhellmann

@dhellmann
Copy link
Member

@electrofelix Did you ping me to give @KSchopmeyer and/or @bartek maintainer access on this repository? I would be happy to do that, I just want to make sure I understand your intent.

@electrofelix
Copy link
Collaborator

@dhellmann I wasn't sure if you were still maintaining, figured it might be worth adding more ( I don't think I have access to merge either but probably not much point in adding me as I'm not using sphinx enough to be confident in the impact of PRS)

@dhellmann
Copy link
Member

ok, I didn't remember who was the most recent maintainer of this. I haven't used it in a long time either.

@dhellmann
Copy link
Member

@KSchopmeyer and @bartek I have sent you both invitations to join the sphinx-contrib org and to be maintainers of this repository. If you post your PyPI account IDs here, I will give you permission to publish releases.

@electrofelix I went ahead and added you to the repo, too, but if you don't want to be a maintainer feel free to drop it.

@bartek
Copy link
Author

bartek commented Oct 21, 2020

@dhellmann Ah that explains that email! Thanks.

I don't know how much spoons I have to support this repository, but I'd like to help. It's been of course a long time since I looked at this code so I'll need to find the time to revisit the PR and see if this is an appropriate approach.

I'll leave myself as a maintainer for now, and if I know I can't keep up, I will remove myself.

My PyPi id is bartekci

@dhellmann
Copy link
Member

@bartek I have invited you on PyPI

@electrofelix
Copy link
Collaborator

Does anyone have an example of the difference this should be making? I tried testing it out recently and I'm not seeing that it actually has any impact, but that could be just due to my rustiness in using this.

I experimented with an old project that I had the extension in https://pypi.org/project/git-upstream/ but flipping between True/False didn't seem to impact, so I'm wondering if some other things have changed since this PR was submitted that are breaking the assumptions.

@bartek
Copy link
Author

bartek commented Nov 24, 2020

@electrofelix It's been awhile but IIRC, we used it on an internal project to consistently expand the toctree, rather than having it expand or collapse contextually, based on the page you were on.

To be honest, when I wrote this PR, I was just throwing code at the wall 🤦‍♂️ and the intent was to begin a conversation for a better solution. I'm happy to help explore that and ideally, write some tests while we're at it.

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.

4 participants