Skip to content
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

Documentation previews are broken due to lack of MathJax javascript #36159

Closed
kwankyu opened this issue Aug 30, 2023 · 0 comments · Fixed by #36160
Closed

Documentation previews are broken due to lack of MathJax javascript #36159

kwankyu opened this issue Aug 30, 2023 · 0 comments · Fixed by #36160
Milestone

Comments

@kwankyu
Copy link
Collaborator

kwankyu commented Aug 30, 2023

#36098 broke the documentation previews for PRs.

CAUSE

The docbuild is zipping up a subtree:

cp -r -L /sage/local/share/doc/sage/html/en/* ./docs
 # Zip everything for increased performance
zip -r docs.zip docs

and then publishing that somewhere. After #36098, tex-chtml.js isn't duplicated inside each _static folder,a and hence it's missing from the zip. This results in the documentation previews lacking mathjax.

SOLUTION

diff --git a/.github/workflows/doc-build.yml b/.github/workflows/doc-build.yml
index 3635980d15..eb4f81f303 100644
--- a/.github/workflows/doc-build.yml
+++ b/.github/workflows/doc-build.yml
@@ -82,6 +82,8 @@ jobs:
         # incremental docbuild may introduce broken links (inter-file references) though build succeeds
         run: |
           set -ex
+          export SAGE_USE_CDNS=yes       
           mv /sage/local/share/doc/sage/html/en/.git /sage/.git-doc
           make doc-clean doc-uninstall sagelib-clean && git clean -fx src/sage
           mkdir -p /sage/local/share/doc/sage/html/en/ && mv /sage/.git-doc /sage/local/share/doc/sage/html/en/.git

would suffice.

vbraun pushed a commit to vbraun/sage that referenced this issue Sep 1, 2023
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->

Fixes sagemath#36159

<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->

URL: sagemath#36160
Reported by: Kwankyu Lee
Reviewer(s):
@mkoeppe mkoeppe added this to the sage-10.2 milestone Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants