reorx / hugo-PaperModX

A fast, clean, responsive Hugo theme.
https://reorx.github.io/hugo-PaperModX/
MIT License
326 stars 86 forks source link

Using Collapse #25

Open BedirT opened 2 years ago

BedirT commented 2 years ago

Hi,

I am trying to use the collapse shortcode, but I couldn't figure out how. I am really new to Hugo so I struggle adding new stuff.

I was able to use a custom one but was hoping I could keep the same style as the TOC and use it in-text. Could you tell me what am I doing wrong?

(I was just trying the {{ collapse }} option)

sethforprivacy commented 2 years ago

@BedirT You can use it like you see here, just include a summary:

https://github.com/sethforprivacy/sethforprivacy.com/blob/master/content/about.md

BedirT commented 2 years ago

@sethforprivacy Thanks for the example, and the answer.

I am still getting an error though.

failed to extract shortcode: template for shortcode "collapse" not found

sethforprivacy commented 2 years ago

Are you sure you're using this specific theme and have it properly enabled/installed? I don't have mine defined anywhere custom, I'm just using collapse as seen here:

./layouts/shortcodes/collapse.html

BedirT commented 2 years ago

yeah, same here.

Here is my repo, I am pretty sure I am using this one

https://github.com/BedirT/bedirt.github.io