You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Material for MkDocs and other doctools (I think that Docusaurus too) implement a feature that load the content of the page without making a regular request to the server 1:
When instant loading is enabled, clicks on all internal links will be intercepted and dispatched via XHR without fully reloading the page.
This makes addons that depend on the actual URL to not work as expected (e.g. docdiff). When loading the page, the addons API is hit with url= but then the user clicks on an internal link, which uses the instant reload feature to load the page content but our addons doesn't do another request with the url= field updated, making docdiff to use the old URL to compare against.
I think we could listen to an event to check if the URL has changed and if so, make a request to the addons API again with the updated url= attribute. It seems there is a navigator API to do this, but it's experimental for now, tho: https://developer.mozilla.org/en-US/docs/Web/API/Navigation_API
Material for MkDocs and other doctools (I think that Docusaurus too) implement a feature that load the content of the page without making a regular request to the server 1:
This makes addons that depend on the actual URL to not work as expected (e.g. docdiff). When loading the page, the addons API is hit with
url=
but then the user clicks on an internal link, which uses the instant reload feature to load the page content but our addons doesn't do another request with theurl=
field updated, making docdiff to use the old URL to compare against.I think we could listen to an event to check if the URL has changed and if so, make a request to the addons API again with the updated
url=
attribute. It seems there is a navigator API to do this, but it's experimental for now, tho: https://developer.mozilla.org/en-US/docs/Web/API/Navigation_APIFootnotes
https://squidfunk.github.io/mkdocs-material/setup/setting-up-navigation/#instant-loading ↩
The text was updated successfully, but these errors were encountered: