-
Notifications
You must be signed in to change notification settings - Fork 4
Hugo demo site does not update theme #7
Comments
Hello Ray, the hugoTheme repository points to the latest commit on the master branch since 11 days. I've rebuild the site for www.themes.gohugo.io with a cleared cache but the build log still show an error message. When running your exampleSite with In that regard, the theme site is as up to date as it can be. Please let me know I missed something. |
As stated above we're pulling commits from the master branch of your repository. The latest commit from master is 003fda5 which is the same hash shown in your screenshot. Should another branch be used for the theme site? Which commit do you expect to be the "latest"? |
Yes, I think I made a mistake. But why does it produce different compilation results? |
Both in my locale machine and in the build log I see the following error message:
Hugo is looking for a stylesheet called but such a file isn't present in resources/_gen/assets/scss/scss. My guess is that you've modified your stylesheets but didn't commit the newly generated scss file with hash For the Hugo theme site the regular version of Hugo (without integrated SCSS compiler) is used. You on the other hand likely using the extended version of Hugo that can compile a new SCSS file if modifications have been detected. The regular Hugo version can't do that. |
The exnteded version of Hugo (0.72.0) generates the stylesheet hugo new site foo
cd foo
git clone https://github.com/ThemeTony/hugo-theme-tony themes/tony
cp themes/tony/exampleSite/config.toml .
hugo Afterwards I see the new stylesheets under > ls _gen/assets/scss/scss
main.scss_b30d9fedec997fa1974d814d8e3cd983.content main.scss_b30d9fedec997fa1974d814d8e3cd983.json Those would only have to be copied to the corresponding folder in this repository. As far as I can see in your gif your are on the |
Hello, I have updated the theme. Please try to pull the code? |
I've pulled your latest changes and looked at them. But in order to fix the error message you have to commit the following files:
You may have to use the files present in the master branch and to run Hugo in the extended version in order to get these stylesheets. |
But my scss file here is still |
I guess I've found the reason the different hash values. Both stylesheets on the master and site-source branch are identical (which I suspected to be the reason). However, before generating the fingerprint for the stylesheet you can see that in one stage the asset pipline depends on the
For the Hugo theme site the defaultContentLanguage is set to |
Okay, thank you very much! ! ! ! ! ! ! I will fix this problem soon. |
Fixed, please try to pull the code? |
In case you've not noticed: aaf7072#r40273020 |
Hello Ray, the changes in aaf7072 (20 days ago) were fine and fixed the problem by removing This can be fixed the same was as before: see aaf7072#r40273020 To clarify your intentions: why did chose |
Hello, @digitalcraftsman. |
Thank you for pointing to your source. I've done a bit of reasearch: The meme theme uses template logic in the stylesheets as well (see here) with a focus on i18n. This way the stylesheet could look different in each language, depending on your content file. As stated in the docs, the second argument of ExecuteTemplateAs is the target path. Therefore, the language prefix has to be added because all files for the chinese version of a website might end up in /zh/css/styles.min.css, not in /css/styles.min.css. Even if the config is the same across all languages the hash for the stylesheets (one per language) is still different, because all three arguments to ExecuteTemplateAs will be used as cache key and thus in a different hash. Because you changed the second argument for ExecuteTemplateAs (i.e. the target path of the rendered css file) in e01e218#diff-cdeb1af1874b1a8f2273f1950c8eba00R6 the hash changed as well. This in turn acutally creates a new CSS file that has to be commited. Otherwise Hugo is unable to find the stylesheet and throws an error. As I learned this now it should be fine to use Otherwise we face our initial issue that on the master branch the |
Okay, thanks for your analysis. I have pushed the latest code, can you try pull? |
With your latest changes the master branch doesn't contain a valid theme structure anymore (i.e. after running The source branch for the demo has to have the same structure as in https://github.com/ThemeTony/hugo-theme-tony/tree/e01e218e56dfa5a003dd6bee89a020c0fe437e14 |
It was my fault... I accidentally pushed the demo site and it has now been fixed. |
Thanks. Your theme is already live again on www.themes.gohugo.io |
Okey, thank you very much. |
Hugo demo site does not update theme, please update submodule.
cc: @digitalcraftsman
The text was updated successfully, but these errors were encountered: