Hi everyone,
I’m trying to write a shortcode to automate rendering links to the Hammerspoon documentation. My first instinct was to use Markdown, so I defined the shortcode like this:
[`{{ .Get 0 }}`](http://www.hammerspoon.org/docs/{{ .Get 0 }}.html)
However, when I invoke the shortcode with {{% hsapi "hs.hotkey" %}}
, the Markdown gets rendered literally, i.e. I get
[`hs.hotkey`](http://www.hammerspoon.org/docs/hs.hotkey.html)
in the output.
I have for now defined the shortcode using HTML, i.e. like this in layouts/shortcodes/hsapi.html
:
<a href="http://www.hammerspoon.org/docs/{{ .Get 0 }}.html"><code>{{ .Get 0 }}</code></a>
And then it works fine, but I’m wondering why the first one does not.
What am I missing? Thanks for any pointers!
ps. I’ve rebooted my website using Hugo. It’s mostly empty for now, but if you want to take a look: http://zzamboni.org/
—Diego