Mermade / widdershins

OpenAPI / Swagger, AsyncAPI & Semoasa definitions to (re)Slate compatible markdown
https://mermade.github.io/reslate
MIT License
1.48k stars 321 forks source link

User defined data fields to be used in templates #537

Open krishamar91 opened 1 year ago

krishamar91 commented 1 year ago

Hi,

I am trying to provide user defined data to the app and use those values in the templates during the MD file generation.

For eg, I need to add an anchor tag in my Slate and I want to provide the values during the MD file generation. So I, want to provide these values in the environment JSON file as shown below. Custom can accept any data structure.

{ "custom": { "cusomData": "customValue" } }

And User this value in the templete .dot file

> <a href="{{=data.custom.cusomData}}">Link to Something</a>