nuxt / content

The file-based CMS for your Nuxt application, powered by Markdown and Vue components.
https://content.nuxt.com
MIT License
3.13k stars 627 forks source link

Trying to make binding-data-in-markdown work with markdown links #2792

Open xalunda opened 1 month ago

xalunda commented 1 month ago

Environment

Reproduction

https://stackblitz.com/edit/nuxt-starter-ysynij?file=content%2Findex.md

Describe the bug

Hi everyone!

I'm not sure if this is a bug or a misuse on my part.

I'm trying to make a simple link in markdown containing binding-data-in-markdown

[text](url)

I have two variables websiteName and websiteLink in the :data prop of ContentRenderer.

I'm tried lots of syntax combinations, I'm trying to:

[{{$doc.websiteName}}]({{$doc.websiteLink}})

The text part is correctly replaced but the link part is not:

%7B%7B$doc.websiteLink%7D%7D

Here is a reproduction.

Let me know if I can help in any way.

Additional context

I also tried to override the ProseA component to check for debug. By the time it reaches this component, the href prop is already this one:

%7B%7B$doc.websiteLink%7D%7D

Logs

No response