Update to next reveal release for self-contained and background-image to work
cderv opened this issue · 2 comments
cderv commented
This is something at the pandoc / reveal level
curl --output background.jpg -L 'https://unsplash.com/photos/8OyKWQgBsKQ/download?force=true&w=1920'
echo "# Slide {data-background-image='background.jpg'}" > slide.md
echo "" >> slide.md
echo "Content" >> slide.md
# Not self contained
pandoc -t revealjs -s -o slide.html --metadata title="test" slide.md
# Self contained
pandoc -t revealjs --self-contained -o slide-self-contained.html --metadata title="test" slide.md
data-uri are not loaded. I believe mainly because the content of data-background-url
is passed to url()
in the slide section by reveal
Source is
data-background-image="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/4gIcSUNDX1BST0ZJTEUAAQEAAAIMbGNtcwIQAABtbnRyUkdCIFhZWiAH3AABABkAAwApADlhY3NwQVBQTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA9tYAAQAAAADTLWxjbXMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAApkZXNjAAAA/
But after reveal.js process, it gets wrongly split into two url()
call
<div class="slide-background-content" style="background-image: url("data:image/jpeg;base64"), url("/9j/4AAQSkZJRgABAQEASABIAAD/4gIcSUNDX1BST0ZJTEUAAQEAAAIMbGNtcwIQAABtbnRyUkdCIFhZWiAH3AABABkAAwApADlhY3NwQVBQTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA9tYAAQAAAADTLWxjbXMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAApkZXNjAAAA/
Should be as with reveal.js 3
<div class="slide-background-content" style="background-image: url("data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/4gIcSUNDX1BST0ZJTEUAAQEAAAIMbGNtcwIQAABtbnRyUkdCIFhZWiAH3AABABkAAwApADlhY3NwQVBQTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA9tYAAQAAAADTLWxjbXMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAApkZXNjAAAA/
Issue opened on Pandoc discuss to have thoughts from Pandoc teams :
https://groups.google.com/g/pandoc-discuss/c/LcbGvVRDoSw
cderv commented
Found the related issue: hakimel/reveal.js#2978
This is a regression from 4.1.1 when support for multiple background image was added
I'll comment there.
cderv commented
This is now fixed in dev version of revealjs hakimel/reveal.js@05e57de
Hoepfully, we'll get a release soon to include