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 support for toctree captions #620

Merged
merged 1 commit into from
Oct 1, 2024

Conversation

greg0ire
Copy link
Member

@greg0ire greg0ire commented Oct 1, 2024

I do not know if that was supported with doctrine/rst-parser, but there is such a thing as a caption option for the toctree directive, and it seems that phpDocumentor/guides supports it.
When I tried it, it produced a p element with a caption class. Adding support for that means we could get rid of the toc and tocheader directives.
These custom directives appear to be the directives that cause the most unfixable warnings (unfixable without a custom guides extension, that is).
We might end up with an extension anyway if there are other warnings, but I think this could be a nice simplification.

I do not know if that was supported with doctrine/rst-parser, but there
is such a thing as a caption option for the toctree directive, and it
seems that phpDocumentor/guides supports it.
When I tried it, it produced a "p" element with a caption class.
Adding support for that means we could get rid of the toc and tocheader
directives.
These custom directives appear to be the directives that cause the most
unfixable warnings (unfixable without a custom guides extension, that
is).
We might end up with an extension anyway if there are other warnings,
but I think this could be a nice simplification.
@greg0ire greg0ire force-pushed the support-menu-caption branch from 220feb1 to 71da777 Compare October 1, 2024 17:33
Copy link
Member

@SenseException SenseException left a comment

Choose a reason for hiding this comment

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

doctrine/rst-parser is gone, so this is a nice addition

@SenseException SenseException merged commit 178f739 into doctrine:master Oct 1, 2024
5 checks passed
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.

2 participants