webpro / reveal-md

reveal.js on steroids! Get beautiful reveal.js presentations from any Markdown file

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

Guts opened this issue Β· comments

Really nice project! Thanks for that πŸ™!

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.

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)

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

  • Copy the template to your folder as index.html or something else
  • Put the filename in you revealmd config
  • Edit the index file and add/edit any css file as desired

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

So, thanks you for your answer. I missed the listingTemplate in configuration:

"listingTemplate": "template/listing.html",

And thanks you too @MartenBE for your working example, it's really helpful πŸ™!

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 ...