-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Fix epub-related failures #8207
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
Fix epub-related failures #8207
Conversation
…n tag if one already exists
…hedocs github repo
|
Thanks for contributing and looking into this! No time to test this yet, but the changes look good besides the one that I noted above at first glance. CI also fails on the requirements.txt. |
No worries. I'll reply to the issue above inline.
The newer version of sphinx, |
mhilbrunner
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had some more time to have another look and leave a few comments.
I agree upgrading our dependencies is worthwhile (and planned for some time), though doing it in this PR would mean this is likely going to need a lot of time for review and proper testing, seeing as it jumps multiple major versions for core things like Sphinx.
Calinou
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally by viewing the generated ePub in Okular 23.08.1, it works as expected.
|
@mhilbrunner Please let me know if there's anything else needed for this PR. I should be much more responsive to requests going forward. |
|
@dylannorthrup No, unless we notice something down the line - because I've just gone ahead and squashed and merged the PR :) Congrats, and thanks for keeping up with all the requests. Thanks for contributing! |
|
Hi, I have been trying to fix 3.x epub version #9485 . I tried to build locally and same problem. Could someone tell me if the same issues happened here? Thank you |
Motivation
I ran into the same problems as described in #7498 and looked into the issue. The underlying errors primarily stemmed from three repeated issues:
<meta name="description" ....>in the same page (which is against W3.org standards)<meta>tags</div>tagEDIT: Removed all module upgrades to reduce the scope of this PR.
In addition, the versions of modules in the currentrequirements.txtdid not have the correct mime-type for.webpimages and thus could not handle them properly. And, after updating the modules, runningmake epubencountered aThemeErrordue to some included CSS and JS file paths having parameters.Changes
This PR makes the following updates:
_extensions/godot_descriptions.pyto skip adding a new<meta name="description"...>tag if one already exists incontext["metatags"]_extensions/godot_descriptions.pyand_templates/layout.htmlto modify<meta ...>tags to<meta ... />(i.e. having the meta element close itself)_templates/layout.htmlto remove the extra</div>element on line 69 (which was chosen over the</div>on line 75 because the indentation on the comments block appeared to indicate it should be inside thedocumentblock)Update thecss/custom.cssandjs/custom.jspaths to remove appended parameters (which the comments indicated were intended to be used for cache busting after updates).Update all versions inrequirements.txtto match the versions in the pip.txt and docs.txt in the main branch of the RTD repopygmentssphinxsphinx_rtd_themesphinx-copybuttonsphinx-notfound-pagesphinxext-opengraphResults
I have been able to generate a valid EPUB file that renders properly on my Mac in
Books.app. I have not tested generation of any other documentation.EDIT: Because the earlier version of the
sphinxmodule does not have a valid mimetype for*.webpimages, building an EPUB file will generate several of the following errors:Those images will not be included in the resulting EPUB file, but I was unable to find a way to update the
mime_suffixeslist configured in the sphinx module.I continue to get aWARNING: [Social card] image cannot be an SVG image, skipping...error when doing EPUB generation, but I was unable to identify where this was coming from and it does not appear to have caused any errors in the resulting EPUB file.