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

Add no_index_entry config variable, and implement :no-index-entry: for autodoc :) #12233

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

sneakers-the-rat
Copy link

Subject: Support use of :no-index-entry: at a project-level and within autodoc.

Feature or Bugfix

  • Feature

Purpose

I love the index directive, and I use it often when I am writing narrative docs. When I also have API docs, though, it quickly becomes very busy for the purpose of having an explicit, manual index: all the symbols from various objects end up there, and the manual index terms are very difficult to parse out.

no-index removes cross-references entirely, but no-index-entry does exactly what I need it to do! Unfortunately it is not supported by autodoc currently. It also is often not supported by downstream packages like sphinx-click, etc.

This PR

  • Adds a :no-index-entry: option to the autodoc directives
  • Adds a no_index_entry (default False) to global configuration options

Detail

In local testing, it seems to work as expected! Please let me know if additional documentation or testing is needed here, or if there is a better way of doing this.

@AA-Turner
Copy link
Member

AA-Turner commented Apr 9, 2024

Please could you remove the configuration variable for now? I'm not convinced of the use, and we have a dizzying array of options already.

A

@sneakers-the-rat
Copy link
Author

no problem. can it remain as part of autodoc_default_options ? that should be good enough for my purposes anyway, i'll take another test with a few external plugins to see if they're hooking into the index in any weirder ways too.

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.

None yet

2 participants