joshed-io / reveal-hugo

📽️ Create rich HTML-based presentations with Hugo and Reveal.js
https://reveal-hugo.dzello.com/
MIT License
671 stars 141 forks source link

Plugin path works in frontmatter of _index.md but not in config.toml #47

Open mjvo opened 5 years ago

mjvo commented 5 years ago

I'm finding that my plugin configuration works when the array is in the frontmatter of _index.md but not when it's in my config.toml file.

When in _index.md, the HTML that is generated is:

<script type="application/json" id="reveal-hugo-site-params">{"height":540,"highlight_theme":"atom-one-dark","margin":0.1,"max_scale":1,"min_scale":0.1,"plugins":["reveal-js/plugin/menu/menu.js"],"theme":"white","width":960}</script>
<script type="application/json" id="reveal-hugo-page-params">{"parallax_background_image":"https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg","templates":{"fish":{"background-image":"https://source.unsplash.com/nI3bUW1Xqik/420x600","background-size":"50%","class":"fish","state":"opacity50"}},"theme":"black"}</script>

and when in the config file, it is:

<script type="application/json" id="reveal-hugo-site-params">{"height":540,"highlight_theme":"atom-one-dark","margin":0.1,"max_scale":1,"min_scale":0.1,"theme":"white","width":960}</script>
<script type="application/json" id="reveal-hugo-page-params">{"parallax_background_image":"https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg","plugins":["reveal-js/plugin/menu/menu.js"],"templates":{"fish":{"background-image":"https://source.unsplash.com/nI3bUW1Xqik/420x600","background-size":"50%","class":"fish","state":"opacity50"}},"theme":"black"}</script>

Is there a different path I need to use when in config.toml vs. _index.md?

joshed-io commented 4 years ago

@mjvo Sorry I dropped the ball on getting you a reply here. Were you able to figure out the issue in the end?

I tried to reproduce with the custom-theme-example deck in the exampleSite folder, but the URL generated for the menu plugin was the same whether I put it in config.toml or _index.md.