Using {slug} in HTML Card

Hello all, I’m attempting to do something that I believe to be simple, but I can’t figure it out as of yet. I simply want to add a parameter in an HTML card that will reference the post’s {slug}. My intent is to create a template using the snippet feature, and I want that template to include the slug that will automatically reference the current post’s slug.

Is this possible?

      <p style="font-family: serif; font-size: 18px">
         <i>read on</i> <u><a href="" target="_blank"></a></u>

The post contents are not dynamically generated, so it’s not possible to do something like that. However, you can use javascript to change the URL on the client side.


Awesome thank you! Could provide a little more insight as to how I do that please?

In your snippet, you can add something like this:

<a class="link-to-current" href="#/current">link</a>
document.querySelectorAll(.'link-to-current').forEach(node => node.href = window.location.href);
1 Like