matcornic / hugo-theme-learn

Porting Grav Learn theme to Hugo
https://learn.netlify.com/en/
MIT License
1.6k stars 1.28k forks source link

attachments not working properly using blogdown #411

Open VEZY opened 4 years ago

VEZY commented 4 years ago

When using blogdown, the attachment shortcode is not working properly when used with arguments:

{{%attachments pattern="coffee.ops"/%}}

would give the following error:

unrecognized character in shortcode action: U+003C '<'. Note: Parameters with non-alphanumeric args must be quoted

I find out the quotes around the value are not parsed properly in the html file, they render as “...” :

<p>{{%attachments pattern=“coffee.ops”/%}}</p>

And should be:

<p>{{%attachments pattern="coffee.ops"/%}}</p>

Replacing manually the quotes seems to work though.

I don't know if the issue comes from blogdown or the learn theme, so I'm posting here for a start :)

Anyway thank you for this wonderful theme !

VEZY commented 4 years ago

Escaping the quotes in the .Rmd seems to work though. This:

{{%attachments pattern=\"coffee.ops\" /%}}

is parsed like this in the html:

<p>{{%attachments pattern="coffee.ops" /%}}</p>