Invalid path in exported html when using a custum theme
PierreRust opened this issue · comments
I'm using a custom theme in my presentation, and a custom css file, using the yaml front matter:
---
theme: theme/orange.css
css: theme/custom.css
---
when generating a static html export, the custom css file is defined using a relative path, but the link to the theme is absolute :
<link rel="stylesheet" href="/_assets/theme/mytheme.css" id="theme" />
<link rel="stylesheet" href="./_assets/theme/custom.css" />
That unfortunately means that when the static export is loaded from a subdirectory on a server, e.g. http://mysite/mypresentation/myslide.html
the link to the custom theme will not work as it resolves to http://mysite/_assets/theme/mytheme.css
. The relative link of the custom css works fine although.
I'm currently using a workaround with a custom template file but it will be nice if the export would add the relative link automatically.
And thanks for that great tool :)
Same issue but using
reveal-md --theme theme/custom.css
My workaround is to point back to my original repository for the css file (I'm generating a site using github actions to github pages).
I have slides embedded in web pages so there are subdirectories galore.
Also an issue if you use a scss theme (reveal.js has .scss themes now)