Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Guts opened this issue Feb 27, 2024 · 5 comments
Closed

Comments

@Guts
Copy link

Guts commented Feb 27, 2024

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.

@webpro
Copy link
Owner

webpro commented Feb 27, 2024

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
Copy link
Contributor

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

@Guts
Copy link
Author

Guts commented Mar 20, 2024

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 🙏!

@Guts Guts closed this as completed Mar 20, 2024
@Guts
Copy link
Author

Guts commented Mar 20, 2024

@MartenBE
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants