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

consider using sphinx-immaterial #2894

Open
d-v-b opened this issue Mar 6, 2025 · 11 comments · May be fixed by #2899
Open

consider using sphinx-immaterial #2894

d-v-b opened this issue Mar 6, 2025 · 11 comments · May be fixed by #2899

Comments

@d-v-b
Copy link
Contributor

d-v-b commented Mar 6, 2025

@jbms maintains an excellent theme for sphinx that (IMO) looks much cleaner than our current theme. I would be interested in seeing what our docs page could look like with that theme.

@dikwickley dikwickley linked a pull request Mar 7, 2025 that will close this issue
6 tasks
@dikwickley
Copy link

Here is a sample: https://zarr--2899.org.readthedocs.build/en/2899/quickstart.html

it's missing the announcement banner, it can be added though: https://jbms.github.io/sphinx-immaterial/customization.html#new-blocks

@jbms
Copy link

jbms commented Mar 7, 2025

Note that to take full advantage, you may want to use the python-apigen extension (replaces autosummary):

https://jbms.github.io/sphinx-immaterial/apidoc/python/apigen.html

@jbms
Copy link

jbms commented Mar 7, 2025

There is also support for JSON schemas as a Sphinx domain, which may not be too useful for zarr-python but could be very useful for the zarr spec:

https://google.github.io/tensorstore/driver/zarr3/index.html#json-driver/zarr3/Metadata

@jbms
Copy link

jbms commented Mar 7, 2025

I see that the API documentation is displaying with weird spacing:

https://zarr--2899.org.readthedocs.build/en/2899/api/zarr/index.html

Not sure if that is a bug in the theme, or caused by some custom css that you have.

@d-v-b
Copy link
Contributor Author

d-v-b commented Mar 8, 2025

i think this looks really good

@dikwickley
Copy link

dikwickley commented Mar 9, 2025

Code blocks in API ref looks really weird. https://zarr--2899.org.readthedocs.build/en/2899/api/zarr/index.html
not sure if this is due to some existing configuration

@jbms
Copy link

jbms commented Mar 10, 2025

Switching from using the numpydoc extension to using sphinx.ext.napoleon should fix at least some of the issues.

@jbms
Copy link

jbms commented Mar 12, 2025

I investigated this a bit more and identified a few bugs and limitations in the sphinx-immaterial theme. Those are now fixed, and I created a PR against the branch that @dikwickley created that makes this theme work much better:

dikwickley#1

@dikwickley
Copy link

thank you @jbms for the changes! but the build failed due to many warnings (that are treated as errors) :(

https://readthedocs.org/projects/zarr/builds/27490786/

@kylebarron
Copy link
Contributor

kylebarron commented Mar 21, 2025

Well... I understand if other developers are reticent, but you could just switch to mkdocs-material. It doesn't look like there's that much prose documentation that you'd need to convert, and I expect the docstrings would continue to work without changes.

I'm heavily biased because I love my mkdocs-based sites, and nowadays mkdocs has really excellent API documentation via mkdocstrings, but I figure that most projects that have been around for a while, like zarr, use sphinx because that was the only option when the project was created.

But this really revolves around whether the developers here actually prefer RST vs Markdown.

@d-v-b
Copy link
Contributor Author

d-v-b commented Mar 21, 2025

personally I would love to use mkdocs-material. And I would be surprised if there's anyone here who strongly prefers rst over markdown.

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 a pull request may close this issue.

4 participants