vjeantet / hugo-theme-docdock

Declination of @matcornic Learn theme to Hugo

Home Page:https://docdock.netlify.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

text after alert shortcode does no render markdown properties

ball-b-doc opened this issue · comments

I am writing
{{% alert theme="danger" %}} Important ! abc

  • item 1
  • item 2

bold-text {{% /alert %}}

The danger alert box is being used, but non of the other markdown properties is interpreted.
result is like:
Important ! abc * item 1* item 2 bold-text

within the alert box.

Any idea?
I have tried this with different files and boxes. Also installed hugo and Docdock on another Mac, but with the same result.
using
Hugo Static Site Generator v0.55.4/extended darwin/amd64 BuildDate: unknown

Applies to Panel as well.

Update: Looks like it's related to a recent Hugo change. See https://gohugo.io/content-management/shortcodes/#shortcodes-with-markdown

Dropping this into the shortcode template fixes the issue

{{ $_hugo_config := `{ "version": 1 }` }}

But I'm not sure if that's what's should really be done, as it looks like the % delimeter approach should work. Maybe I'm misreading the docs?

This thread helps clarify things: https://discourse.gohugo.io/t/misunderstanding-of-shortcode-syntax-in-0-55/18538

The problem is caused by the template for the alert shortcode containing HTML tags.

Changing the shortcode to use

{{.Inner | markdownify}}

instead of just {{.Inner}} will fix the problem. The other shortcodes are likely to be impacted the same way