Hi guys!
A client of mine is keeping a journal and we want to make it available online using Hugo.
This is the desired and already used format.
# 2019-12-21
Text in *Markdown format.*
#tag1 #tag2
# 2019-12-20
Another post.

#tag1 #tag3
And this is the desired output format:
<dl>
<dt>2019-12-21</dt>
<dd>
<p>Text in <em>Markdown format.</em></p>
<ul>
<li><a href="/tags/tag1">tag1</a></li>
<li><a href="/tags/tag1">tag2</a></li>
</ul>
</dd>
<dt>2019-12-20</dt>
<dd>
<p>Another post.</p>
<p><img src="image1.jpg"></p>
<ul>
<li><a href="/tags/tag1">tag1</a></li>
<li><a href="/tags/tag3">tag3</a></li>
</ul>
</dd>
</dl>
Any ideas how to treat the .md
file almost as if it were a YAML file and e.g. turn # YYYY-MM-DD
into a heading? (Tags might be the most complicated part. But it’s ok to just recognise without linking them.)
Thanks you very much in advance.