Partial set in md

Hey,

I think I am asking for the world in this question but does anyone know how to set a partial from the md file?

The background is this, in my blog articles I want to embed my codepen creations as a sort of dynamic header as a good few of them are animation. So I have created standalone sections that contain there css and js.
If I use the below in the article.html it works perfect and my animation acts as a header.

{{ partial "experiments/20160524-alpha" . }}

However, the problem lies is the fact that the template is shared and I want to set the header for each of the individual posts. So I need to pass what partial to call with the md. I have tried the following

embed = {{ partial "experiments/20160524-alpha" . }} where I call{{ .Params.embed }} in the html page.
embed = "experiments/20160524-alpha" where I call{{ partial "{{ .Params.embed }}" . }} in the html page.

I would consider the content tag to output the code but then I would lose in built text formatting and have to opt for a massive variable call which I don’t think will be to nice.

Regards
C

I think you want Shortcodes, not partials

I think he wants partials, and what he wants is possible – but it is hard to see the issue without a complete example. (like a project on GitHub or similar)

The above doesn’ work, but this should:

{{ partial .Params.embed }}

Bep that is the code I needed.

I was able to called the external partial through the md with
embed= “experiments/20160524-alpha”

And with your suggested {{ partial .Params.embed }} It works a treat injecting it just where I needed.

Many thanks