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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add contents entries for object & :nocontentsentry: #43

Merged
merged 2 commits into from
Apr 9, 2023

Conversation

n-peugnet
Copy link
Contributor

@n-peugnet n-peugnet commented Apr 6, 2023

This allows to automatically add entries for domain objects in contents table with Sphinx >= 5.2.
See sphinx-doc/sphinx#10807 and sphinx-doc/sphinx#10886

See also an example here with my (still small) documentation : https://club-1.github.io/sphinx-inventory-parser/index.html

(I didn't add the php:namespace in my docs as it caused issues with :php:attr: references for some reason, I will open an issue (and/or a PR) for this bug soon)

No namespace

toc_object_entries_show_parents = hide

Screen Shot 2023-04-06 at 12 53 48
Screen Shot 2023-04-06 at 12 53 56

toc_object_entries_show_parents = domain

Screen Shot 2023-04-06 at 12 55 02
Screen Shot 2023-04-06 at 12 55 08

toc_object_entries_show_parents = all

Same results as toc_object_entries_show_parents = domain

With namespace

toc_object_entries_show_parents = hide

Screen Shot 2023-04-06 at 12 58 48
Screen Shot 2023-04-06 at 12 58 52

toc_object_entries_show_parents = domain

Screen Shot 2023-04-06 at 12 58 20
Screen Shot 2023-04-06 at 12 58 30

toc_object_entries_show_parents = all

Screen Shot 2023-04-06 at 12 57 25
Screen Shot 2023-04-06 at 12 57 33

the default theme does not support it very well 馃槄

This allows to automatically entries for domain objects in contents
table with Sphinx >= 5.2.

See <sphinx-doc/sphinx#10807> and
<sphinx-doc/sphinx#10886>
@n-peugnet
Copy link
Contributor Author

n-peugnet commented Apr 6, 2023

I didn't think to check your tests until now, it behaves as expected except for the all parameter which throws an error. I'm working on a fix.

EDIT: done!

@markstory
Copy link
Owner

It would be good to have this behaviour included in the tests. We could have separate documents for different modes.

Having some examples in the test builds will help ensure that these modes continue to build without errors.

@n-peugnet
Copy link
Contributor Author

We could have separate documents for different modes.

The issue is that this is a global sphinx parameter. One possibility could be to run the test multiple times with a different value each time using sphinx-build -D option.

@markstory
Copy link
Owner

I can take care of updating the CI configuration to build with different option values.

@markstory markstory merged commit e335ccb into markstory:master Apr 9, 2023
@markstory
Copy link
Owner

Thank you 馃帀

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