I had some troubles adding reference-style links to shortcodes (renders as plain text). I read this one: “Markdown Reference Links in Shortcodes - support - HUGO” and I was wondering if this is something that will be supported in the future?
I.e. Syntax below to be supported:
# Some markdown
{{<admonition-shortode type="note" >}}
See: [This reference style link][1] to solve your issue.
{{</admonition-shortode>}}
[1]: https://google.com
Thanks for a great tool! Making documentation really fun.
Yes that works. I wonder though if the syntax of having a reference-style link listed outside of a shortcode, then linking to an entry in that list inside of a shortcode will be supported. The problem is that It’s not possible to be DRY when having a lot of links on a page.
Using the below in /layouts/shortcodes/admonition-shortcode.html
`{{- $allowedTypes := slice “warning” “caution” “note” “troubleshooting” “tip” -}}
{{- $type := .Get “type” -}}
{{- $typeClass := lower $type -}}
{{- if not (in $allowedTypes $typeClass) -}}
{{ $typeString := delimit $allowedTypes ", " }}
{{- errorf “[admonition] wrong or empty value for ‘type’ (use one of %s): %s” $typeString .Position -}}
{{- end -}}
{{- $title := .Get “title” }}
{{- $inner := .Inner }}
Also, when posting to this forum, please wrap your examples (code, data, configuration, markup, etc.) within triple backticks, or use the </> button in the menu.