hugo-faq-theme icon indicating copy to clipboard operation
hugo-faq-theme copied to clipboard

Is it possible to include markdown or HTML in the answers?

Open RyanMcCarl opened this issue 7 years ago • 3 comments

I would really like to be able to include links, screenshots, and other formatting in the answers, but I don't see how to do this because they are formatted as TOML valuels. Example:

[[items]]

question = "How do I sign up?"
answer = "Click 'Get Started' on WordBrewery's [homepage](https://wordbrewery.com). You can sign up with Google, Facebook, or email. If you sign up with your email, you will receive a confirmation email confirming that your address was entered correctly. Click the link in that email to activate your account."

The link in the answer appears literally and is not parsed. Is there anything I can do about this?

Thank you!

RyanMcCarl avatar Mar 24 '17 03:03 RyanMcCarl

Hy, Did you find the solution for this problem please?

HajerEB avatar Aug 08 '18 13:08 HajerEB

Hi, I modified line 37 of the themes index.html file to look like this: <p>{{.answer | markdownify}}</p> This will let you use some markdown in your answers.

casprung avatar Aug 29 '18 11:08 casprung

Thank you so much casprung! It works great!

Laetgark avatar Apr 08 '21 05:04 Laetgark