Hi, I need input and the label for it in each postcard on the home page. I wish if Hugo auto-generate it.
Suppose I need several divs like:
<div class="post-card">
<div><label for="AUTO_GENERATED_ID"></label></div>
<div><input type="checkbox" id="AUTO_GENERATED_ID"></div>
</div>
I tried to do it like truncuating title of post.
<div class="post-card">
<div><label for="{{.Title | truncate 5 }}"></label></div>
<div><input type="checkbox" id="{{.Title | truncate 5 }}"></div>
</div>
But I’m not satisfied with that method. Can you guys help me? Note: I need that piece of string twice i.e. for both label and input.