pydata / pydata-sphinx-theme

A clean, three-column Sphinx theme with Bootstrap for the PyData community
https://pydata-sphinx-theme.readthedocs.io
BSD 3-Clause "New" or "Revised" License
601 stars 314 forks source link

handle null result from queryselector #1683

Closed drammock closed 8 months ago

drammock commented 8 months ago

should hopefully fix #1626

@dbitouze or @peytondmurray can you test on your sites?

dbitouze commented 8 months ago

should hopefully fix #1626

@dbitouze or @peytondmurray can you test on your sites?

It would be a pleasure! For this, is it enough for me to make the changes https://github.com/pydata/pydata-sphinx-theme/pull/1683/files#diff-dff36566ae5c858672e0d5a02ec6a57756f11ff11751e0cf7509098fb0941234 into my local .venv/lib/python3.10/site-packages/pydata_sphinx_theme/assets/scripts/pydata-sphinx-theme.js and to rebuild my site?

peytondmurray commented 8 months ago

@dbitouze If you're using a requirements.txt, you'll need to change the pydata-sphinx-theme entry to something that conforms to pip's VCS support:

pydata-sphinx-theme @ git+https://github.com/drammock/pydata-sphinx-theme@fix-queryselector

Or if you aren't installing from a requirements.txt you can just do

pip install git+https://github.com/drammock/pydata-sphinx-theme@fix-queryselector

@drammock Thanks for the fix :rocket: this solves the JS error for me, and I can see the sidebar again. Brilliant!

dbitouze commented 8 months ago

@peytondmurray Thanks!


@drammock Thanks for the fix 🚀 this solves the JS error for me, and it looks like it fixes #1635. Brilliant! :smile: