-
Notifications
You must be signed in to change notification settings - Fork 45
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
Embed images into HTML document #523
Comments
The PR #522 also includes a version update for the GH actions |
Thank you, Antonio @cofinoa. Do you have an example of what the HTML looks like? |
@JonathanGregory in PR #522 run checks summary and artifacts has been uploaded to: where you can find an artifact for the conformance document, and the artifact for the PDF and HTML documents. |
Ah, I see. Each image is included as a string representation of its image data in the |
Yes!, it makes the HTML file itself bigger. Also, the image content is BASE64 encoded, adding and overhead between 33%-37% with respect to the original binary data. But, the good side it's that only on file it's needed for the HTML document. Therefore, it's trade-off |
The advantage is when one wants to download the html for offline access it is one file (~3.2 Mb), instead of either getting the html file without images (~840 kb), or the html file and an image directory (~840kb + ~1.9 Mb) depending on how the download is done. As it now is, If I uses Firefox to download the HTML link on the webpage I get the former, but if I open the html document in Firefox and then save the the document I get the latter. But I imagine this may differ between web browsers. Anyway, the size difference is about 1 Mb, which is not excessive, and I think there is merit to always get the full document without having to think of a separate image subdirectory. Thanks Antonio. I will have a look at the PR, but I am far from an expert on gh workflows. |
Is it ready to be merged, Antonio @cofinoa? @larsbarring and I expressed for support for it more than three months ago, so it qualifies to be accepted, I think. I'd like to have @davidhassell's opinion, as the person in charge of the conventions document. |
I'm updating the build process taking into account some comments from @davidhassell After that, @davidhassell will review the PR and check that it's OK |
Hi Antonio, I have just fetched a copy of your PR [*], typed conformance_build/conformance.html
conformance_build/conformance.pdf
conventions_build/cf-conventions.html
conventions_build/cf-conventions.pdf I also tried $ make clean; make
$ make clean; make html
$ make clean; make pdf
$ make clean; make html pdf
$ make clean; make all
$ make clean; make conformance
$ make clean; make conventions which also worked as expected. This is marvellous - thank you! I'm happy for this to be merged. We should make it known that this capability exists, as as it will be useful to anyone writing PRs. Cheers, [*] $ git fetch upstream pull/522/head:cofinoa-embed-html-img
$ git checkout cofinoa-embed-html-img |
Thanks again for this, Antonio @cofinoa. @davidhassell is quite right to describe it as "marvellous" - maybe even magical! Now that he's checked it too, and since it's received more than enough support to be accepted, I will merge it. |
Associated pull request
PR #522
The proposed PR #522 modifies the Github action which renders the HTML document of the convention, to embed images into the HTML document, instead of refer images as external file.
This has the advantage of having just one file, for the whole HTML convention document, like the PDF rendered version.
The text was updated successfully, but these errors were encountered: