# Issue with shortcode change not being picked up

**URL:** <https://discourse.gohugo.io/t/issue-with-shortcode-change-not-being-picked-up/28756>\
**Category:** Uncategorized\
**Created:** [October 10, 2020, 2:55pm UTC](https://discourse.gohugo.io/t/issue-with-shortcode-change-not-being-picked-up/28756 "2020-10-10T14:55:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kristvanbesien](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/kristvanbesien/32/12536_2.png) [@kristvanbesien](https://discourse.gohugo.io/u/kristvanbesien)\
**Post date:** [October 10, 2020, 2:55pm UTC](https://discourse.gohugo.io/t/issue-with-shortcode-change-not-being-picked-up/28756/1 "2020-10-10T14:55:21Z")

</div>

I am trying out creating my own shortcodes. One thing that is however baffling me is that sometimes when I change a shortcode the change is not reflected in the live website.

I run “hugo server -D” and am currently at version 0.77

Situation:

I have two shortcodes.

wrap.html

`{{ .Inner }}`

And

photo.html

```
<figure itemprop="associatedMedia" itemscope itemtype="https://schema.org/ImageObject">
  <a href="{{ .Get "href"}}" itemprop="contentUrl" data-size="{{ .Get "largeDim"}}" data-medium-url="{{ .Get "smallUrl" }}" data-medium-size="{{ .Get "smallDim" }}">
    <img alt="{{ .Get "alt"}}" data-size="{{ .Get "thumbSize"}}" itemprop="thumbnail" src="{{ .Get "thumbUrl"}}">
  </a>
  <figcaption itemprop="caption description">
      {{ .Get "caption"}}
      {{ if (not (eq (.Get "copyright") "")) }}
      <span itemprop="copyrightHolder">&#169; {{ .Get "copyright"}} all rights reserved</span>
      {{ end }}
  </figcaption>
</figure>

```

And a md page that contains something like this:

```
{{< wrap >}}

{{< photo href="/images/Drone_Pictures/large/20201009_132117_1600x1199.jpg" largeDim="1600x1199" smallUrl="/images/Drone_Pictures/small/20201009_132117_800x600.jpg" smallDim="800x600" alt="None" thumbSize="256x256" thumbUrl="/images/Drone_Pictures/thumb/20201009_132117_256x256.jpg" caption="" copyright="KvB 2020" >}}

{{< photo href="/images/Drone_Pictures/large/20201009_132125_1600x1199.jpg" largeDim="1600x1199" smallUrl="/images/Drone_Pictures/small/20201009_132125_800x600.jpg" smallDim="800x600" alt="None" thumbSize="256x256" thumbUrl="/images/Drone_Pictures/thumb/20201009_132125_256x256.jpg" caption="" copyright="KvB 2020" >}}
{{< /wrap >}}

```

_This is actually from HugoPhotoSwipe, which I found here: [https://github.com/GjjvdBurg/HugoPhotoSwipe/wiki#gallery-configuration](https://github.com/GjjvdBurg/HugoPhotoSwipe/wiki#gallery-configuration)_

I wanted to take this further and modify the shortcode to style the page the way I want. So I for example added something to the “wrap” shortcode and did see the page change.

But if I add something to the photo shortcode this does not get reflected in the rendered page, unless I stop and start the server.

Is this because the shortcode is nested, and thus does not get rendered?

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [October 10, 2020, 3:24pm UTC](https://discourse.gohugo.io/t/issue-with-shortcode-change-not-being-picked-up/28756/2 "2020-10-10T15:24:16Z")

</div>

> [@kristvanbesien](#):
>
> Is this because the shortcode is nested, and thus does not get rendered?

Probably.

Hugo keeps track of which templates are in use by a given Page’s Content, which can get rather complex when you consider shortcodes, render hooks, the .Render func and also transitive usage (e.g. inclusion of other pages’ content via GetPage…

I don’t remember exaclyt how this works re shortcodes, but there may be a hole in the logic here. Could you raise an issue on GitHub?
