-
Notifications
You must be signed in to change notification settings - Fork 945
Open
Labels
Description
Originally posted by @deining in #526 (comment) :
I just realized that shortcode
lead
treats its.Inner
content either as markdown or as HTML, depending on the extension of the page that makes use of the the shortcode:{{ if eq .Page.File.Ext "md" }} {{ .Inner | markdownify }} {{ else }} {{ .Inner | htmlUnescape | safeHTML }} {{ end }}
Does it make sense to implement this for shortcode
feature
in a similar way?
IMHO, that is the wrong way to do it. When using a shortcode, one needs to use either {{< >}}
or {{% %}}
instead, depending on the content of the shortcode (HTML and markdown, respectively).
If we all agree that this is the way to go, then a number of files will need to be changed (which mostly were introduced by #378 I believe):
- blocks/feature reworked to support use from .md files #727
-
layouts/shortcodes/alert.html
- A better alert shortcode more markdown friendly #941 -
layouts/shortcodes/card.html
- [BSv5] Adapt cardpane shortcode #1376 -
layouts/shortcodes/blocks/cover.html
- shortcode 'blocks/cover': improvements #1400 -
layouts/shortcodes/imgproc.html
- Fix: shortcodeimgproc
does not work with % for markdown body #1522 -
layouts/shortcodes/blocks/lead.html
- shortcode 'blocks/lead' improvements #1398 -
layouts/shortcodes/blocks/section.html
- [BSv5] blocks/section row-col hierarchy fix #1472 - And other shortcodes, see the output of the GH search for .Page.File.Ext "md"
Related: