I have shortcodes file [ checkbox.html ]
<label class="inline-flex items-center">
<input type="checkbox" class="form-checkbox h-5 w-5 text-gray-600">
<span class="ml-2 text-gray-700">...</span>
</label>
in md file i insert :
{{< checkbox >}} 3 russet potatoes, peeled and shredded
this will happen on html rendering :
in regular html file i must insert “3 russet potatoes, peeled and shredded” at span tags, so what method that i must use to insert md content to < span > … < /span > tags ?
I believe that this is more or less what you need.
<label class="inline-flex items-center">
<input type="checkbox" class="form-checkbox h-5 w-5 text-gray-600">
<span class="ml-2 text-gray-700">{{.Get 0}}</span>
</label>
And then at the .md you’d:
{{< checkbox "russet potatoes, peeled and shredded" >}}
There are other ways to define and call shortcodes, which you can find in the docs if you ever need more flexibility.
system
Closed
December 14, 2020, 3:35pm
4
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.