Found the related issue: https://github.com/hakimel/reveal.js/issues/2978
This is definitely something in revealjs that change in version 4.1.1. It works ok with 4.1.0
pandoc -t revealjs --self-contained -o slide-self-contained.html --metadata title="test" -V revealjs-url=https://unpkg.com/reve...@4.1.0/ slide.md
Le mardi 28 septembre 2021 à 11:21:18 UTC+2, christophe dervieux a écrit :Hello,
Here is a reproducible example of the issue
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
When using
self-contained
, the background image is no more working. Pandoc encodes todata:
but it seems reveal.js does not know how to handle it. It split the encodeddata:
in two url component.It seems like a change in reveal 4 as using the same
slide.md
file with different version seems to break.What I tried:
- Pandoc 2.9.2.1 : last one compatible with reveal.js 3 I believe
Works as expectedpandoc.exe -t revealjs --self-contained -o slide-self-contained.html --metadata title="test" -V revealjs-url=https://unpkg.com/reveal.js@3/ slide.md
- Pandoc 2.10: First to use reveal.js 4
pandoc.exe -t revealjs --self-contained -o slide-self-contained.html --metadata title="test" -V revealjs-url=https://unpkg.com/reveal.js@4/ slide.md
So it seems that something broke when upgrading.
Is this a known issue ?
Should I open an issue in Pandoc to track ? I believe this could be something in reveal.js not handling correctly encodeddata:
field.MANUAL still says (https://pandoc.org/MANUAL.html#background-in-reveal.js-and-beamer)
Background images can be added to self-contained reveal.js slideshows and to beamer slideshows.
But maybe
self-contained
andrevealjs
does not work well.Thank you