-
-
Notifications
You must be signed in to change notification settings - Fork 244
Theme demos stopped working for a larger number of themes #412
Comments
Hello Michael, thank you for getting in touch. @onedrawingperday already reported this issue to me earlier this morning. I'll investigate it further in order to find the issue. |
OK cool! Wanted to make sure. :) |
I suspect that the demo building fails for some (probably good) reason for some themes, and this isn't detected by the script. There is a logic in there to "show the demo button or not". |
I cannot pinpoint when the theme demos started to 404. It seems that affected themes have a naming discrepancy in the config of their Example Sites. For example a theme called That wasn’t the case until recently. Some of the Demos that have the 404 problem were up and running a week ago or something. |
My theme did not build (no demo button)
in a shortcode (starting from hugo 0.43.0 the .Permalink of an image resource does no longer include BaseURL sub-dirs, if
is given (as in generateThemeSite.sh) I'm currently prefixing the .RelPermalink with .Site.BaseURL as a workaround |
@it-gro What you mention is different to what this issue is about. Also I would suggest that you remove This issue is about theme demos going 404 since last week or so. Thanks. |
Looks like starting with 0.42 we see errors if
0.41.* does not show those effects E.g.:
https://themes.gohugo.io/hugo-theme-sam/ Themes with shortcodes and theme name missmatch
Themes without exampleSite/static and theme name missmatch
|
@it-gro Thank you for spending so much time on this. The problem that was discovered last week was about: And the cause is probably as you pointed out:
There are also other variations of the above that seem to cause this problem e.g. But as I said above up until last week these Demos were generated despite the above. (As for the other themes that fail to even have a demo button, it's always been like that. Whenever a Hugo feature gets re-written or deprecated if a theme uses said feature then its demo will not be published) |
is there anything theme developers can do to resolve this issue for their themes? |
In your Example Site’s config you need to enter |
@onedrawingperday thanks will do it ... :) |
Thank you @onedrawingperday and @it-gro for compiling this list of themes. For testing purposes I ran the build script Hugo v0.47.1 and looked at the generated output. A folder for the theme demo is generated and contains, as far as I can tell, all expected files expect the In order to isolate the issue further I downgraded the Hugo versions (beginning from the latest v0.47.1 release) successively to see when theme demos began to break. I have to note that I do this based on the latest commit at the time of writing. Hugo version v0.45 and greater showed a demo button but pointed to a 404 error page. v0.42 - v0.44 caused runtime panics which made the whole build fail. Recall that I used the latest commit of this repository which might be incompatible with the state of the repository during the release of Hugo v0.42 - v0.44. Hugo v0.41 was the first downgraded version that worked fine. v0.41 was released on 25 May. I don't think that an issue that affects so many themes would be unnoticed over months. I'm not sure if this helps to reason about the cause of this issue. Some of your might be able to reproduce this results. |
Yes, I came to the same result (see above)
I showed 2 scanarios where we see an issue - there are probably more.
In theory the
Hmm, I didn't spot the missing "Demo" button on my theme page. My theme did not build (as I wrote here in the first place) because of the documented breaking changes of .GetPage in 0.45. |
hugo-minimalist-theme config.toml
but the directory unter The generation goes without any error - but with warnings. No layouts are found.
No Error => Demo button = yes with debug:
But no files are created:
Same goes down to version 0.42.0
0.41.0 is fine:
|
Setting the theme path via the `-t THEME` flag isn't recognized and still requires to use the HUGO_THEME env variable as workaround. See #412 See gohugoio/hugo#5061 See gohugoio/hugo#4851
The themes Hello Friend and Minimal Academic have their demos working again after the GitHub issues I opened. However I have reason to believe that the 404 issue was caused in Hugo 0.47 and it is related to line 328 of this commit gohugoio/hugo@e5052f4#diff-efb3671b5bf861640622f1c34f07ada9R328 Of course I may be wrong, but in any case I think that you should look into this. CC / @bep @digitalcraftsman |
My Theme Alpha-Church has now got the demo button again, however CSS isn't loading for the demo site. Firefox says it's because the SRI integrity check is failing. I wonder if this is because the resources folder is committed for both the theme and the demo site. I'm a bit surprised by this - I'm not sure why Hugo is building the resources folder for the demo site when they already exist in the theme folder. |
I think the above should be posted as a separate issue. This issue is about the 404. |
@onedrawingperday thanks, I'll open a new issue. |
@digitalcraftsman was trying to re-apply this workaround in commit 3068f64, but for some reason that commit contains whitespace cleanup only. The following commit message was from that commit: Setting the theme path via the `-t THEME` flag isn't recognized and still requires to use the HUGO_THEME env variable as workaround. See #412 See gohugoio/hugo#5061 See gohugoio/hugo#4851 This reverts commit 0b4e98b.
Hey! I'm the Can be this an issue with the extended version of Hugo? My theme uses SCSS pipeline. |
@luizdepra Recently we have updated the Theme's repository README please have a look. Also if in your theme you have a SCSS pipeline, then you need to commit the contents of the Please do the above. And let me know. Thanks. |
@anthonyfok Your commit 3e9282e fixed the demos that were throwing a 404 error on my end. 👍 🥇 @digitalcraftsman This issue can be closed. P.S. I cannot close this issue myself because I am on the Hugo Web team it seems that this repository belongs to the Hugo Core Team. |
@onedrawingperday hmm... I would rather avoid to distribute the |
@luizdepra This is not up for discussion. It is current policy. See: Your theme was added before Hugo Pipes but there is no way to generate a demo on Netlify without committing the Resources. Also a theme needs to work even in the Basic version of Hugo. See: |
Hello,
Are there known issues with this site? It seems like there are a lot of broken links. Some examples here:
https://themes.gohugo.io/theme/classless-hugo/
https://themes.gohugo.io/theme/hugo-theme-sam/
https://themes.gohugo.io/theme/hugo-icarus/
https://themes.gohugo.io/theme/highlights/
https://themes.gohugo.io/theme/hugo-paper-now/
https://themes.gohugo.io/theme/strata/
I am looking over the open issues and do not see this captured. Sorry if this is already known! Please let me know and I will close if so.
Thank you,
Michael
The text was updated successfully, but these errors were encountered: