My site is based on beautiful theme Future imperfect slim. This theme is legacy now. It works fine up to Hugo 0.111.3.
Since Hugo 0.112 (I tested 0.112.1 with the theme’s example site. I didn’t test 0.112.0 on windows, since chocolatey does not know this) there is an error, see red encircled area in screenshot:
In the screenshot you can also see a part of the main.js. The original file is here. The BaseURL in the example site’s config is
baseurl = "https://hugo-future-imperfect-slim.netlify.app/"
I have to admit this exceeds my coding/debugging skills. Release notes and also forum search couldn’t help me. Maybe you can give me a hint? Thanks!
From anywhere, in any template, you can get site values with:
To get a site value from the top level context passed into a page, you can use either of these:
Prior to v0.112.0 you could also do this:
The constructs above are nonsensical, undocumented, and should never have worked. They were removed in v0.112.0.
Your theme uses the nonsensical constructs above. Look at these lines:
The theme author passes
$.Site (which in this context is
.Page.Site) into main.js here:
And then they try to access the baseURL with
.Site.BaseURL. Put the two together and you get…
To fix this, change lines 12 and 38 in layouts/partials/scripts.html, replacing
To really fix this, use an actively maintained theme.
@jmooring Thank you for this quick and perfect answer. Issue is resolved
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.