Hi guys,
so I participated in this “100 days to offload” challenge and I have added a tag “100dto” to all the posts I wrote to automatically add a small piece of text at the bottom of the individual post. But now I want to go a second round, something like a second season.
I am looking for a more elegant way in writing my bit of code below.
The requirements are:
- have a small piece of text added automatically to the blog post
- number should be somewhere in the tags or somewhere else
- should be future-proof, so I can go a third or fourth season without adding more blocks (if possible)
{{ with $.Param "100dto" }}
<p><i>Beitrag {{ $.Param "100dto" }} der ersten
<a href="https://100daystooffload.com" target="_blank" rel="noopener">#100DaysToOffload</a> Challenge.</i>
</p>
{{ end }}
{{ with $.Param "100dto2" }}
<p><i>Beitrag {{ $.Param "100dto2" }} der zweiten
<a href="https://100daystooffload.com" target="_blank" rel="noopener">#100DaysToOffload</a> Challenge.</i>
</p>
{{ end }}
If you have any idea if I could do this in a better way, I am open for suggestions.
I don’t mind updating tags on all past 100 posts if your solution suggests some other system.
Thank you very much.