-
Notifications
You must be signed in to change notification settings - Fork 130
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
DOC: Add download link for executed .ipynb file #751
Conversation
Looks good to me. Continuing the discussion from the issue: I don't think If you decide to document a button or link for downloading notebooks as a feature as well (and thereby close the mentioned issue) I would also suggest mentioning about how downloads of this manner will not work on cross-origin links, e.g., on PR builds on readthedocs because the URL would not be the same as that of the stable documentation. The reason is that it is a security measure in modern browsers (the origin of which was discussed in this Bugzilla report): a cross-origin download link could lead to users downloading an unverified file of the same name hosted on a different server with malicious intent. |
What do you mean by "document"?
But isn't the The download link also works on the PR build on RTD: https://nbsphinx--751.org.readthedocs.build/en/751/ |
Yes, if you decide to add some additional documentation for how others can use this feature, that is
That's strange. It does not work on the PR build where I had added it myself. Maybe it is due to the extra Edit: okay, I see it now. In your case, it downloads the notebook from the PR build itself, but our build leads us to a different link (it downloads the notebook from docs.pybamm.org instead). So the point about cross-origin links remains valid. |
Yeah, but that's definitely not a workflow that I would recommend. You are linking to the I would recommend to link to the notebooks of the exact same version as the doc build. |
ec1ccb7
to
55c4809
Compare
That sounds like a good idea to prevent potential link rot. Thank you for the recommendation! |
See discussion in #745.