Request: printing files in circular loop, when detected

I have a circular loop somewhere:

> hugo server -D
Start building sites …
hugo v0.105.0-0e3b42b4a9bdeb4d866210819fc6ddcf51582ffa darwin/arm64 BuildDate=2022-10-28T12:29:05Z VendorInfo=gohugoio
Error: Error building site: "/path/to/_index.md:1:1": 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.
Built in 30124 ms

I am not sure how the circular detection works in Hugo.

The feature idea is this: somehow printing the circular path, to aid in root causing. Do the Hugo devs think this is a feasible feature?

No, but if you post a link to your project repository we may be able to help you find the problem.

1 Like

Okay sounds good, per printing circular paths.


Also, I appreciate the willingness to help! I found last night that Hugo 0.105.0 failed to build per a circular detection after adding a Table of Contents. Fortunately, some change added in Hugo 0.111.0 fixed it! So I bumped to latest version of Hugo, 0.114.0 and no more circular detection issues.

If I get really stuck with a circular detection issue with Hugo 0.114.0, I will make a separate post.

1 Like