Hi there
Here’s a weird one… Inside articles, I want to link to specific related articles with this shortcode:
{{<preview-internal src="articles/s2s-stairs-to-success">}}
The shortcode looks like this:
{{ with .Site.GetPage (.Get "src") }}
<div class="shadow card">
<div class="card-body">
<div class="media">
<div class="media-body">
<h6><a href="{{ .RelPermalink }}" class="stretched-link">{{ .Title | markdownify }}</a></h6>
<p>{{ .Summary | markdownify }}</p>
</div>
</div>
</div>
</div>
{{ end }}
The weird thing is that when I run Hugo in the console, it seems to hang up itself. After 30s it ends saying: timed out initializing value. You may have a circular loop in a shortcode, or your site may have resources that take longer to build than the
timeout limit in your Hugo config file.
It gets more confusing: If I remove {{ .Summary }}
, the rest suddenly works and hugo.exe runs fine. The summaries of the two related articles that reference each other contain simple text strings. The summary (and other fields, too) seem to cause a loop, the title or publishdate field on the other hand not.
I used the most recent v0.80.0. What do you make of this?