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

Notes data content from toml file #78

Open
saratrajan opened this issue Feb 27, 2020 · 3 comments
Open

Notes data content from toml file #78

saratrajan opened this issue Feb 27, 2020 · 3 comments

Comments

@saratrajan
Copy link

Great work on this theme, team!

I am having a slight glitch while trying to move all my notes into a dedicated data/notes.toml.

For eg. I have added below to my data/notes.toml

slideonenote = '''

Hello to audience

'''

.. and I am adding it to my _index.md like below

---

<some content for the slide>

{{% note %}}
{{< slide content="notes.slideonenote" >}}
{{% /note %}}

---

It does not work. Notes section is blank on my Presenter Mode.

Any tips here? Is this supported yet?

Note: I tried moving {{% note %}} inside of my toml and it started appearing as slide text (visible) on my app!

@joshed-io
Copy link
Owner

Thanks for the kinds words!

I haven't tried to nest a slide shortcode inside of a note shortcode before, though I understand what you're attempting to do. I'll have to look at what happens and the resulting HTML created.

The {{% note %}} not working in toml is expected, Hugo will only process shortcodes that originate inside of content files.

@saratrajan
Copy link
Author

Thanks for the quick response!
I would eagerly await to hear back on your attempt. Would be nice to conceal the presenter notes from the main markdown, to maintain slides neater. Glad you understood what I was trying to achieve here.

Cheers.

@gesinn-it-gea
Copy link

I had a similar problem when I tried to use Hugo's figure shortcode in a /data/*.toml:

gallery = '''
{{< figure src="/media/logos/1.svg" height="100" >}}
{{< figure src="/media/logos/2.svg" height="100" >}}
'''

I wanted to create a slide with an image gallery that is reused in multiple presentations. Any hints / alternate approaches are welcome.

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