-
Notifications
You must be signed in to change notification settings - Fork 28
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
Details directive not redering properly with dirhtml builder #184
Comments
I can't reproduce this from the example project you uploaded. Note, that I started a fresh python env to test the example submitted. At first, I removed the dependency for sphinx-design (not actually used in the example). After the admonitions rendered correctly, I re-enabled (& installed) sphinx-design. The results were the same regardless (expected behavior). In looking at your posts, the fact that div elements were used indicates (to me) that the |
This might have something to do with the lack of transformation (from div to details/summary elements). I inspected the CI build of our docs with the dirhtml builder, and it shows the same problem: This isn't really a problem with the theme because the A quick test build using the dirhtml builder for our docs with the following patch --- a/sphinx_immaterial/details_patch.py
+++ b/sphinx_immaterial/details_patch.py
@@ -3,7 +3,7 @@ from docutils import nodes
try:
from sphinxcontrib.details.directive import ( # pytype: disable=import-error
- DetailsDirective,
+ DetailsDirective, DetailsTransform
)
IS_INSTALLED = True
@@ -36,3 +36,4 @@ def monkey_patch_details_run():
if IS_INSTALLED:
monkey_patch_details_run()
+ DetailsTransform.builders = ("html", "dirhtml") renders the |
@2bndy5 thanks for finding and resolving this! |
Like you all, I am using the
sphinxcontrib-details-directive
.. details::
directive. A while ago I noticed it stopped working (not appearing as a dropdown section). I also noticed you all did some work on patching that directive (#45).Today I tried to get that directive working again. I'm replicating your use of
.. details::
in this project's docs and just can't reproduce the functionality. Any thoughts?I'm using the latest everything:
sphinx
v5.3.0sphinx-immaterial
from commit 000192d (latest on main)sphinxcontrib-details-directive
v0.1.0Example
foo-183.zip
renders as
Build output
HTML of index.html
The text was updated successfully, but these errors were encountered: