Inserting html links from markdown frontmatter

I’m trying to add the author link defined in the markdown to be inserted into my layout

blog-post.md

---
author: <a href="https://www.somesite.com/author/">Author Name</a>
title: Some blog post
---

I want the author anchor tag to be inserted into my layout, so I did this:

{{ if isset .Params "author" }}
<span class="author">{{ .Params.author }}</span>

but the output comes out as:

<span class="author">&lt;a href=&#34;https://www.somesite.com/author/&#34;&gt;Author Name&lt;/a&gt;</span>

Any suggestions?

The reason I want the anchor tags to work is that I’m migrating the blog from Jekyll to Hugo and there are a lot of posts to split the links into title and urls and is tedious.

Try safeHTML

{{ .Params.author | safeHTML }}
1 Like

Thank you so much, that is all I needed.