backslide
backslide copied to clipboard
Exporting includes empty base64 content for fonts
I'm using font awesome. bs serve
works like a charm (thank for this nice tool), but when exporting, the font css in the final html lokks like:
@font-face{font-family:'Font Awesome 5 Brands';font-style:normal;font-weight:normal;src:url('data:application/vnd.ms-fontobject;base64,');src:url('data:application/vnd.ms-fontobject;base64,')
The font is empty.
Something effectively does not seems right 😄
I remember that is used to work though as I did the same thing and using Font Awesome 5 in my slides were not an issue at export.
https://github.com/remy/inliner is used to perform the inlining, either an update have broken it or latest PR merged here have broken it, I'll have a look.
In the meanwhile can you try with the feature/refactor
branch to see if the issue is still present? See https://github.com/sinedied/backslide/issues/43#issuecomment-433311866 for how to install and use it.
Before trying the feature/refactor
branch, I tried with the docker to try reproducing the problem in a controlled environment, but docker run --rm -v $(pwd):/src taobeier/backslide export
gives:
mime.getType(...) is not a function
mime.getType(...) is not a function
mime.getType(...) is not a function
mime.getType(...) is not a function
mime.getType(...) is not a function
mime.getType(...) is not a function
mime.getType(...) is not a function
Whereas serving via the docker worked well.
Images ans fonts are not included in the resulting html.
feature/refactor
branch neither produces an html file with the font embeded (the font awesome css doesn't seem to be included whereas it was in the master version).
For info, having installed inliner 1.13.1
and doing:
bs export -l
inliner -n -m dist/201809-sécurité.html > res.html
worked well.
Not using the -n
(no compression) produces an invalid HTML.
Sorry for the delay and thanks for the feedback, I will take a look. If it works with inliner directly it's good news, maybe it's just a matter of updating the version in backslide.
Yes indeed, but note that it didn't work directly with inliner without the -n
switch (no compression).