How Do I Use the Bootstrap Accordion classes/capability? #837
Unanswered
snesbittsea
asked this question in
Q&A
Replies: 2 comments 1 reply
-
Hi, I think the raw HTML was omitted by Markdown parser, you can change it by setting the following configuration on [markup.goldmark.renderer]
unsafe = true However, the recommended way to do that is creating a shortcode, such as // PUT YOUR ACCORDION CODE HERE. And then use the shortcode in Markdown pages. {{< my-accordion >}}
You can also define a general shortcode that accepts headers and their contents parameters, the details can be found at https://gohugo.io/templates/shortcode-templates/. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi Razon!
Thanks much for the quick reply and excellent suggestions!
Was able to get it working with minimal difficulty using shortcodes.
I'm pretty new to Go and Hugo, so I'm struggling to figure out what the questions are!
…-steve
---- On Sat, 24 Dec 2022 19:59:09 -0700 Razon Yang ***@***.***> wrote ---
Hi, I think the raw HTML was omitted by Markdown parser, you can change it by setting the following configuration on config.toml.
[markup.goldmark.renderer]
unsafe = true
However, the recommended way to do that is creating a shortcode, such as layouts/shortcodes/my-accordion.html.
// PUT YOUR ACCORDION CODE HERE.
And then use the shortcode in Markdown pages.
{{< my-accordion >}}
The unsafe setting is not need to be set.
You can also define a general shortcode that accepts headers and their contents parameters, the details can be found at https://gohugo.io/templates/shortcode-templates/.
—
Reply to this email directly, #837 (comment), or https://github.com/notifications/unsubscribe-auth/ADKGZRVFJPVN2TGIRP4VXG3WO6Z73ANCNFSM6AAAAAATIQVI74.
You are receiving this because you authored the thread.
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a content section that would benefit from leveraging the Bootstrap Accordion capability. The question is how?
I've tried adding and index.md file with the Bootstrap Accordion example, but it appears that those classes are not seen - at least no content in an class=accordion" div is displayed.
What am I missing and how can I get it to work?
Thank in advance for your help and patience.
-steve
Beta Was this translation helpful? Give feedback.
All reactions