hugo-PaperModX icon indicating copy to clipboard operation
hugo-PaperModX copied to clipboard

Using Collapse

Open BedirT opened this issue 3 years ago • 4 comments

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)

BedirT avatar Sep 08 '22 20:09 BedirT

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

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

sethforprivacy avatar Sep 09 '22 18:09 sethforprivacy

@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

BedirT avatar Sep 09 '22 18:09 BedirT

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

sethforprivacy avatar Sep 09 '22 19:09 sethforprivacy

yeah, same here.

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

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

BedirT avatar Sep 09 '22 19:09 BedirT