DOC: Add light/dark theme switcher
With the upgrade to the latest version of pydata-sphinx-theme (see #48285) our docs now are available in dark mode. By default, the Sphinx theme will use the version (light/dark) set up by the user. But would be nice to add a switcher to the navigation bar of the docs, so users can change the theme manually.
See for example in the top right corner of https://www.blosc.org/c-blosc2/c-blosc2.html the icon to change the sphinx theme. I think we should add the same to the pandas docs too.
Hi, I am new to open source and would love to work on this issue. Can you assign this to me?
Assigned. In the pandas repo, if you write /take in a comment of an issue or PR, it should get assigned to you. Thanks for working on this. If you need help setting up the environment... You can have a look at the developers documentation: https://pandas.pydata.org/docs/dev/development/index.html
@datapythonista thank you for assigning me this issue.
Hi @datapythonista, I wanted to know for which page exactly the dark theme is available because I am able to see the dark theme only on https://pandas.pydata.org/docs/dev/ and where exactly you want me to implement the switch (page and location)?
We are using sphinx and the pydata sphinx theme to generate our docs. We don't need to implement it, we just need to set up the theme to show the light/dark switcher. You can check the theme, https://github.com/pydata/pydata-sphinx-theme and the contributing to the docs section in our documentation to understand better.
@datapythonista Hi, I want to use /take command for other issue, but it seems to be not working. Does /take command need time to be assigned? Actually, I want to work on #48561 . Thanks.
@datapythonista Hi, I want to use /take command for other issue, but it seems to be not working. Does /take command need time to be assigned? Actually, I want to work on #48561 . Thanks.
Ah, sorry, I think it may be take without the slash in pandas. Implemented in other projects too as /take, but when I implemented it in pandas having a heading slash was not usual yet
@datapythonista Oh I think it works. I think it will be better to provide guide about the commands such as "take" for newbies like me.
It's documented in the developers guide in our docs, not sure exactly where, but you should be able to find it.
Hi, can I too work on this issue?
Hi, can I too work on this issue?
Sure, go ahead. Thank you!
Hi @datapythonista , is there any other way to generate the web page as it is showing me requests.exceptions.HTTPError: 403 Client Error: rate limit exceeded for url: https://api.github.com/users/ this error. Do I need to regenerate the web page every time I make any changes?
You can use --ignore-io-errors to avoid that error.
Hi @datapythonista, I have added a switcher to the doc file and I wanted to know how to write it in the documentation. Should I send a pull request first?

Yes, if you have the changes locally, and want to get your changes into our official docs, the only way is opening a pull request