# Hugo server error: doesn't render a shortcode

**URL:** <https://discourse.gohugo.io/t/hugo-server-error-doesnt-render-a-shortcode/43240>\
**Category:** support\
**Tags:** shortcodes\
**Created:** [March 2, 2023, 8:40am UTC](https://discourse.gohugo.io/t/hugo-server-error-doesnt-render-a-shortcode/43240 "2023-03-02T08:40:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pgersl](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/pgersl/32/19440_2.png) [@pgersl](https://discourse.gohugo.io/u/pgersl)\
**Post date:** [March 2, 2023, 8:40am UTC](https://discourse.gohugo.io/t/hugo-server-error-doesnt-render-a-shortcode/43240/1 "2023-03-02T08:40:18Z")

</div>

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

This is my markdown code:

```auto
{{< 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:

```auto
<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:

```auto
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?

---

<div class="post-metadata">

**Author:** ![andrewd72](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/andrewd72/32/18371_2.png) [@andrewd72](https://discourse.gohugo.io/u/andrewd72)\
**Post date:** [March 2, 2023, 9:31am UTC](https://discourse.gohugo.io/t/hugo-server-error-doesnt-render-a-shortcode/43240/2 "2023-03-02T09:31:34Z")

</div>

> [@pgersl](#):
>
> `<span><a href="mailto:{{.Get "mail"}}>{{.Get "mail"}}</a></span>`

You are missing a closing quote on the href.

---

<div class="post-metadata">

**Author:** ![pgersl](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/pgersl/32/19440_2.png) [@pgersl](https://discourse.gohugo.io/u/pgersl)\
**Post date:** [March 2, 2023, 9:52am UTC](https://discourse.gohugo.io/t/hugo-server-error-doesnt-render-a-shortcode/43240/3 "2023-03-02T09:52:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/system/32/1_2.png) [@system](https://discourse.gohugo.io/u/system)\
**Post date:** [March 4, 2023, 9:53am UTC](https://discourse.gohugo.io/t/hugo-server-error-doesnt-render-a-shortcode/43240/4 "2023-03-04T09:53:15Z")

</div>

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