webpro / reveal-md

reveal.js on steroids! Get beautiful reveal.js presentations from any Markdown file
MIT License
3.74k stars 416 forks source link

Is there a way to customize the index.html generated with `--static` with some CSS? #477

Closed Guts closed 7 months ago

Guts commented 8 months ago

Really nice project! Thanks for that :pray:!

Here is the command I use to generate static slides to host them on GitLab Pages (sorry locked repo):

reveal-md content/slides --absolute-url https://lessons.ingeoveritas.com --featured-slide 1 --assets-dir content/slides/_assets/ --css content/slides/_assets/ingeoveritas.css --static build/slides

But the index.html is poorly stylized:

image

I expected that my custom css (passed as -css) would be used also for this page. Am I missing something?

Thanks for your help.

webpro commented 8 months ago

Here's the template: https://github.com/webpro/reveal-md/blob/main/lib/template/listing.html

Looks like only a theme is supported, not custom CSS.

Feel free to add it (you could steal from the slides template: https://github.com/webpro/reveal-md/blob/main/lib/template/reveal.html)

MartenBE commented 7 months ago

You can find a similar workflow here: https://github.com/HoGentTIN/hogent-revealmd

Guts commented 7 months ago

OMG I've missed the previous answer from @webpro, sorry for that!

So, thanks you for your answer. I missed the listingTemplate in configuration: https://github.com/webpro/reveal-md/blob/7822ab9230073721d190d8234b3bf8145c81d6fa/lib/defaults.json#L6

And thanks you too @MartenBE for your working example, it's really helpful :pray:!

Guts commented 7 months ago

By the way @MartenBE you may have noticed that mermaid is now supported out-of-the-box (https://github.com/webpro/reveal-md/releases/tag/6.1.0-next.0) so https://github.com/HoGentTIN/hogent-revealmd/blob/31521f131d0b284d38adefe68aad9b43fd4f8c31/reveal-md.json#L6 could be removed?

MartenBE commented 7 months ago

By the way @MartenBE you may have noticed that mermaid is now supported out-of-the-box (https://github.com/webpro/reveal-md/releases/tag/6.1.0-next.0) so https://github.com/HoGentTIN/hogent-revealmd/blob/31521f131d0b284d38adefe68aad9b43fd4f8c31/reveal-md.json#L6 could be removed?

I have, but I can't seem to get it to work on the example repo. Perhaps @webpro could try it out on the given example repo? I am probably doing something wrong ...