Including Content Snippet Not Reloading in Server Mode

I have a shortcode that looks like this:

{{ $file := .Get 0 }}
{{ $page := .Site.GetPage $file }}
{{ with $page }}
  {{ .RawContent }}
{{ end }}

That I can then call with {{< readfile "content-dir/" >}}

That works fine, but if I edit the file being read in hugo server mode, it does not cause the parent page to redraw, unless I stop the server and restart.

Although I am unable to reproduce the problem as described, there are several known issue with nested content. What you are experiencing is probably one of the known issues related to the development server.

Out of curiosity, the unable to re-produce, is there a way to get this to work? Or mainly that this particular way isn’t supported at this time?

I suspect this is correct. From the list of issues that I linked to there are at least two that are similar to what you described.

I was unable to reproduce your problem with v0.118.2 on linux/amd64.

In your case, the page loaded the new content being read? I’m on the same version FYI

Yes, it did.

Interesting, would you mind describing how you implemented your version and the behavior you’re seeing?

I did exactly as you described.

Huh interesting, I’m on linux and and the same version, so maybe something to do with it being the home page, or some bug in hugo.