-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
background-image
in YAML metadata is not embedded as base64 in self-contained reveal.js
#5124
Comments
The problem here is that once the template has been resolved, the image file is not in an
To find this and replace it with a data URI, pandoc would have to parse and understand the JavaScript snippet. That's a bit beyond pandoc's pay grade, currently! I suppose we could special-case this variable, though, in the HTML writer: if self-contained is set, we could replace it with a data URI before passing it to the template. |
Well, yes, I agree, that's a bit heavy to ask for. ;-)
That would, indeed, be excellent. Not being able to declare a general background is not quite a showstopper, but a fairly basic limitation IMHO. So a work-around seems like a very good idea. (Either that, or the docs need to be fixed so that they reflect this limitation.) Thanks a lot! |
Hm, actually this is a bit tricky, because the HTML writer doesn't know if self-contained has been set. |
Just checking if there is any plan to move this forward? |
No, the situation is much the same. If we changed |
Hi,
I think I have run into a bug.
I am trying to create a stand-alone reveal.js presentation, and I would like to have a background image on all slides. Embedding of images, generally speaking, works fine: Images are converted and embedded in base64 inline form.
However, this is not the case for the background image I specify in the YAML metadata block. The background image tag is, in principle, evaluated, but the image is still loaded from the specified location instead of being embedded in the stand-alone file.
I am running version 2.4 on Manjaro:
Steps to reproduce:
reveal.js
:test.html
into a browser.test.html
into a new browser tab.Expected behaviour: Show the title page with an image of the moon as background in both browser tabs.
Observed behaviour: The second browser tab has no background image. The HTML file tries to load the image from the (removed) file; the image is not embedded in the stand-alone HTML file.
Using
parallaxBackgroundImage
instead ofbackground-image
does not fix the problem.Am I taking a wrong turn somewhere? Any pointers would be greatly appreciated if that is indeed intended behaviour. #3979 suggests that the above should work though.
The text was updated successfully, but these errors were encountered: