On Sat, 2 May 2020 at 17:03, Steve <
gp6...@gmail.com> wrote:
>
> Chris, the docs indicate that the value still needs to be resolved to be passed to the template.
>
> Suppose I create shortcodes/foo.tmpl as such:
>
> This uses the bar variable: ${bar}
>
> And my post contains this:
>
> {{% foo bar=slug %}}
>
>
> Then the output file will contain:
>
> This uses the bar variable: slug
>
> But I want to output the value of slug. In shell it would be the simple difference of echo $slug vs echo slug.
The docs also have this paragraph:
The post in which the shortcode is being used is available as the post
variable, so you can access the title as post.title, and data loaded
via the data field in the metadata using post.data(key).