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
565 stars 304 forks source link

fix URLs for dirhtml builds #1699

Closed drammock closed 5 months ago

drammock commented 5 months ago

closes #1675

@kathatherine can you try out this branch to see if it fixes dirhtml builds for you?

kathatherine commented 5 months ago

Followed most of the instructions here to set up a dev environment with your branch. Whether I build the pydata-sphinx-theme docs or my own set of docs, I get the following extension error:

Handler <function _fix_canonical_url at 0x10598cae0> for event 'html-page-context' threw an exception (exception: _fix_canonical_url() takes 3 positional arguments but 5 were given)

Uncertain if I've done something wrong or if there's an underlying issue with the branch, but it does appear that the failing tests are giving the same error.

Thanks for attempting to fix this!

kathatherine commented 5 months ago

Thanks for the tip on that theme install. TIL!

This appears to get the job done for my dirhtml built docs. 🎉

I didn't notice any edge cases when clicking around. Thanks very much!

drammock commented 5 months ago

Team, I'll plan to self merge this one tomorrow unless someone wants extra time to review. I think it's a pretty innocuous change