Hugo server error: doesn't render a shortcode

Hey, I am trying to implement a shortcode on my website to create custom HTML for some contact information.

This is my markdown code:

{{< contact pic="/images/base/image.webp" name="Petr Geršl" position="web-design" mail="pgersl@example.com" tel="999999999" site="pgersl.xyz" >}}

This is the shortcode I am using:

<div class="contact-container">
    <div class="contact-picture">
        <img src="{{.Get "pic"}}">
    </div>
    <div class="contact-info">
        <span><strong>{{.Get "name"}}</strong></span>
        <span>{{.Get "position"}}</span>
        <span><a href="mailto:{{.Get "mail"}}>{{.Get "mail"}}</a></span>
        <span><a href="tel:{{.Get "tel"}}">{{.Get "tel"}}</a></span>
        {{with .Get "site"}}
        <span><a href="https://{{.}}/" target="_blank">{{.}}</a></span>
        {{end}}
    </div>
</div>

Hugo throws an error at me, which looks like this:

Rebuild failed:

"/home/pgersl/Code/astropi-hackathon-website/content/kontakt/_index.md:18:1": failed to render shortcode "contact": failed to process shortcode: execute of template failed: html/template:shortcodes/contact.html: "\"" in attribute name: "\">"

Where do you think is the issue?

You are missing a closing quote on the href.

Oh my, what a dumb mistake, thanks, it works now.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.