# Template for shortcode not found

**URL:** <https://discourse.gohugo.io/t/template-for-shortcode-not-found/55867>\
**Category:** support\
**Tags:** shortcodes\
**Created:** [September 6, 2025, 12:09am UTC](https://discourse.gohugo.io/t/template-for-shortcode-not-found/55867 "2025-09-06T00:09:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SpeedOfEve](https://avatars.discourse-cdn.com/v4/letter/s/b9e5f3/32.png) [@SpeedOfEve](https://discourse.gohugo.io/u/SpeedOfEve)\
**Post date:** [September 6, 2025, 12:09am UTC](https://discourse.gohugo.io/t/template-for-shortcode-not-found/55867/1 "2025-09-06T00:09:39Z")

</div>

Hello everyone,

I’m working on a site for a TTRPG. I read the page on creating shortcodes, but I keep getting “failed to extract shortcode: template for shortcode “ability” not found.” However, I’m not seeing what I’m doing wrong, maybe something obvious?

I have this shortcode, “ability”. I’ve tried putting it under layout\_shortcodes\_ability.html, layout\shortcodes\ability.html, layout\shortcodes\_ability.html, and layout\_shortcodes\ability.html, yet it’s still not finding it. Here’s the contents and a usage of it (of which usage I’ve tried both % and \<\>)

```auto
<div class="ability-container">
	<div class="ability-title">
		{{ with .Get "name" }}<strong>{{ . }}</strong>{{ end }}
	</div>
	<div class="ability-stats">
		{{ with .Get "ap" }}<span><strong>AP:</strong> {{ . }}</span>{{ end }}
	</div>
	<div class="ability-description">
		{{ .Inner | safeHTML }}
	</div>
</div>

```

```auto
{{% ability name="Dash" ap="2" %}}
For this turn, you are able to move twice your Speed. Can only be used once per turn.
{{% /ability %}}

```

I also have an assets\ability.scss for the shortcode. Any help would be appreciated, thank you! I can’t quite figure out what I did wrong from reading the shortcode documentation, so I must be acting stupid and missing something terribly obvious lol.

---

<div class="post-metadata">

**Author:** ![SpeedOfEve](https://avatars.discourse-cdn.com/v4/letter/s/b9e5f3/32.png) [@SpeedOfEve](https://discourse.gohugo.io/u/SpeedOfEve)\
**Post date:** [September 6, 2025, 12:27am UTC](https://discourse.gohugo.io/t/template-for-shortcode-not-found/55867/2 "2025-09-06T00:27:29Z")

</div>

I figured it out, I just had to restart the server with \_shortcodes\ability.html. The server kind of bugged out not wanting to recompile it while running. Solved! Just restart the server c:

---

<div class="post-metadata">

**Author:** ![tifenak](https://avatars.discourse-cdn.com/v4/letter/t/e36b37/32.png) [@tifenak](https://discourse.gohugo.io/u/tifenak)\
**Post date:** [September 6, 2025, 1:19am UTC](https://discourse.gohugo.io/t/template-for-shortcode-not-found/55867/3 "2025-09-06T01:19:56Z")

</div>

I also noticed the server throws the same error if I declare a shortcode in markdown files before creating the template, and the error persists even after creating it. I have to restart the server to resolve the issue.

---

<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:** [September 8, 2025, 1:19am UTC](https://discourse.gohugo.io/t/template-for-shortcode-not-found/55867/4 "2025-09-08T01:19:57Z")

</div>

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