-
Notifications
You must be signed in to change notification settings - Fork 86
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 images do not work with self contained documents #39
Comments
The html file is not fully self contained when using |
This is confirmed with pandoc 2.14.2 : Even with <div class="slide-background-content" style="background-image: url('background.jpg');"></div> I believe this is because it happens on the client slide through reveal.js library and pandoc can't just encode those image path. Single self-contained file could be difficult to produce when those attributes are used... 🤔 This needs to be check with Pandoc project |
Ok now I know more about revealjs, it seems that one need to use ---
title: "Habits"
author: John Doe
date: March 22, 2005
output: revealjs::revealjs_presentation
---
# In the morning {data-background-image="background.jpg"} Otherwise, Pandoc won't base64 encode the attributes.
Code in Pandoc: https://github.com/jgm/pandoc/blob/8018179b3df34cd7fdbd77c7a08b21fd8d5b5b31/src/Text/Pandoc/SelfContained.hs#L57
It seems reveal.js is guessing what to do when only
Anyway, I close this as it is working as documented |
When I create a reveal.js presentation with background images and send the file to someone else or copy the file to another folder (copying it to the same folder still works), all background images disappear.
In my case a simple reproducable error looks like this:
reveal-test.rmd
After compilating the html-file and opening it (firefox or chrome in my case) everything works. After copying the file to another folder, all background images disappear. This includes background videos, but not websites or colors.
I got the error with both Ubuntu and Windows 7.
The text was updated successfully, but these errors were encountered: