Hugo extended needed for Hugo Fresh theme

Moderators, feel free to move this to a separate area if desired.
I tried following what appears to be very well written getting started instructions but ran into an error. For non-expert users, running into issues such as this occur frequently and are a frustration commonly posted in this forum. Probably something I have neglected to do, but still… I really like the looks of the demo!
root@fedora28 my-site]# hugo server
Building sites … ERROR 2018/08/23 23:52:11 error: failed to transform resource: TOCSS: failed to transform “style.sass” (text/x-sass): this feature is not available in your current Hugo version
Total in 13 ms
Error: Error building site: logged 1 error(s)
[root@fedora28 my-site]# hugo version
Hugo Static Site Generator v0.47.1 linux/amd64 BuildDate: 2018-08-20T08:16:52Z
[root@fedora28 my-site]#

You need to install the extended version of hugo, I think.

Interesting, The Themes Page mentions – Minimum Hugo Version: 0.45 for what I think are the requirements. I searched the documents for the extended version of Hugo and it looks like I have to either compile Hugo from source or install yet another Linux package updater (Snaps) to get the Extended functionality. I am not sure I like either option to obtain a single binary. Am I missing an option or relevant documentation?

@mojoa

Thank you for letting us know. We have a policy in which Hugo themes assets should be considered as stable and theme authors who use Hugo Extended features should commit their /resources/ directory so that a theme works in all versions of Hugo.

@lucperkins probably hasn’t noticed this new policy. His theme was added a while back before Hugo Extended existed and he has updated it without committing the /resources/ directory.

I have just opened the following GitHub Issue to let him know:

EDIT
@mojoa

You can clone the updated Hugo Fresh theme from its repository on GitHub. It will now work with the basic version of Hugo.

@lucperkins addressed this issue very fast. Again my thanks!

2 Likes

Thank You for your assistance. I removed the my-site directory and followed the instructions line by line again with the same error as a result. Is there something else I need to do?

The Hugo Fresh repo was updated 33 minutes ago.

When did you try to execute the command: git clone https://github.com/lucperkins/hugo-fresh themes/hugo-fresh?

Can you please try again? You shouldn’t receive anymore errors such as: failed to transform resource: TOCSS because the theme’s resources are now present.

Per the Instructions.
Regards,

[root@fedora28 hu3]# rm -rf ./my-site
[root@fedora28 hu3]# ls
[root@fedora28 hu3]# pwd
/home/ktst/hu3
[root@fedora28 hu3]# hugo new site my-site && cd my-site
Congratulations! Your new Hugo site is created in /home/ktst/hu3/my-site.

Just a few more steps and you're ready to go:

1. Download a theme into the same-named folder.
   Choose a theme from https://themes.gohugo.io/, or
   create your own with the "hugo new theme <THEMENAME>" command.
2. Perhaps you want to add some content. You can add single files
   with "hugo new <SECTIONNAME>/<FILENAME>.<FORMAT>".
3. Start the built-in live server via "hugo server".

Visit https://gohugo.io/ for quickstart guide and full documentation.
[root@fedora28 my-site]# git clone https://github.com/lucperkins/hugo-fresh themes/hugo-fresh
Cloning into 'themes/hugo-fresh'...
remote: Counting objects: 264, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 264 (delta 1), reused 8 (delta 1), pack-reused 252
Receiving objects: 100% (264/264), 714.75 KiB | 1.08 MiB/s, done.
Resolving deltas: 100% (68/68), done.
[root@fedora28 my-site]# rm config.toml
rm: remove regular file 'config.toml'? y
[root@fedora28 my-site]# curl -O https://raw.githubusercontent.com/lucperkins/hugo-fresh/master/exampleSite/config.yaml
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  5250  100  5250    0     0  11241      0 --:--:-- --:--:-- --:--:-- 11217
[root@fedora28 my-site]# hugo server
Building sites … ERROR 2018/08/24 13:57:23 error: failed to transform resource: TOCSS: failed to transform "style.sass" (text/x-sass): this feature is not available in your current Hugo version
Total in 23 ms
Error: Error building site: logged 1 error(s)
[root@fedora28 my-site]# # hugo version
Hugo Static Site Generator v0.47.1 linux/amd64 BuildDate: 2018-08-20T08:16:52Z
[root@fedora28 my-site]#

I edited your post so that the console output is within a code block.

Can you tell me if the following directory is present in your cloned theme:
/hugo-fresh/resources/_gen/assets/sass/

Within that directory there should be 2 files.

If not present then manually grab these files from here and place them in the above directory path.

Thank you for your help!

[root@fedora28 resources]# pwd
/home/ktst/hu3/my-site/resources
[root@fedora28 resources]# ls -lta
total 8
drwxr-xr-x 2 root root 4096 Aug 24 13:57 .
drwxr-xr-x 9 root root 4096 Aug 24 13:57 ..
[root@fedora28 resources]# cd ..
[root@fedora28 my-site]# pwd
/home/ktst/hu3/my-site
[root@fedora28 my-site]# ls -lta ./themes/hugo-fresh/resources/_gen/assets/sass/
total 180
drwxr-xr-x 2 root root   4096 Aug 24 17:38 .
drwxr-xr-x 3 root root   4096 Aug 24 17:38 ..
-rw-r--r-- 1 root root 170698 Aug 24 17:38 style.sass_cf66e63debe6917c04534d6c7b66f623.content
-rw-r--r-- 1 root root    193 Aug 24 17:38 style.sass_cf66e63debe6917c04534d6c7b66f623.json
[root@fedora28 my-site]# pwd
/home/ktst/hu3/my-site
[root@fedora28 my-site]# hugo server
Building sites … ERROR 2018/08/24 17:44:30 error: failed to transform resource: TOCSS: failed to transform "style.sass" (text/x-sass): this feature is not available in your current Hugo version
Total in 19 ms
Error: Error building site: logged 1 error(s)
[root@fedora28 my-site]#

A bit more information:
Following the instructions listed for the Theme:
Hugo server is looking for:

newfstatat(AT_FDCWD, "/home/ktst/hu3/my-site/resources/_gen/assets/sass/style.sass_5ad6f408b0e3e473c748aac88af0ea18.json", 0xc420796378, 0) = -1 ENOENT (No such file or directory)

But the only similar files are found

[root@fedora28 my-site]# find . -name style.sass_*.json -print
./themes/hugo-fresh/resources/_gen/assets/sass/style.sass_cf66e63debe6917c04534d6c7b66f623.json
[root@fedora28 my-site]#

Would Hugo find this file if I copied it or does something else need to be done?
Thanks!

Following the instructions step by step, I can not get this theme to work.

Apparently there is not an easy fix the forum can recommend.

What are the next steps for me in this case?

Please contact the team creator

Thank You for responding!
The Theme creator has been contacted about the Theme not meeting some Hugo requirement policy for posting Hugo Themes. ( see above )

I am not really qualified to determine if changes made now meet the requirement, but I tested and can’t get Hugo Server to run by following the instructions posted on the Theme page.

If I contact the Theme creator I could say little more than “I can’t get it to work”, which would probably not be well received.

Is there anyone who can articulate the problem to the Theme owner? Apparently it has some very nice features!

I just downloaded the theme as is and startet Hugo server. No probs at all (see screenshot). So there might be something wrong with your general setup.

Thank You… Can you see where I am going wrong?


[root@fedora28 ktst]# mkdir hux
[root@fedora28 ktst]# cd hux
[root@fedora28 hux]# hugo version
Hugo Static Site Generator v0.47.1 linux/amd64 BuildDate: 2018-08-20T08:16:52Z
[root@fedora28 hux]# hugo new site my-site && cd my-site
Congratulations! Your new Hugo site is created in /home/ktst/hux/my-site.

Just a few more steps and you're ready to go:

1. Download a theme into the same-named folder.
   Choose a theme from https://themes.gohugo.io/, or
   create your own with the "hugo new theme <THEMENAME>" command.
2. Perhaps you want to add some content. You can add single files
   with "hugo new <SECTIONNAME>/<FILENAME>.<FORMAT>".
3. Start the built-in live server via "hugo server".

Visit https://gohugo.io/ for quickstart guide and full documentation.
[root@fedora28 my-site]# git clone https://github.com/lucperkins/hugo-fresh themes/hugo-fresh
Cloning into 'themes/hugo-fresh'...
remote: Counting objects: 264, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 264 (delta 1), reused 8 (delta 1), pack-reused 252
Receiving objects: 100% (264/264), 714.75 KiB | 2.78 MiB/s, done.
Resolving deltas: 100% (68/68), done.
[root@fedora28 my-site]# rm config.toml
rm: remove regular file 'config.toml'? y
[root@fedora28 my-site]# curl -O https://raw.githubusercontent.com/lucperkins/hugo-fresh/master/exampleSite/config.yaml
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  5250  100  5250    0     0   9813      0 --:--:-- --:--:-- --:--:--  9813
[root@fedora28 my-site]# hugo server
Building sites … ERROR 2018/08/26 11:32:20 error: failed to transform resource: TOCSS: failed to transform "style.sass" (text/x-sass): this feature is not available in your current Hugo version
Total in 19 ms
Error: Error building site: logged 1 error(s)
[root@fedora28 my-site]# pwd
/home/ktst/hux/my-site
[root@fedora28 my-site]# 

  1. In your Hugo project folder first remove any /themes/ directory.
  2. Then simply execute the command git clone https://github.com/lucperkins/hugo-fresh themes/hugo-fresh
  3. Now you should have /themes/hugo-fresh
  4. Then in the config.toml of your project enter the following parameter theme = "hugo-fresh"
  5. Run hugo server
  6. Your site should build and you shouldn’t see the Error you described above.

I just tested the above I do not have Hugo Extended just the Basic version of Hugo.

If the above does not work for you I’m afraid that I’m out of ideas.

You don’t have extended edition installed…

He doesn’t need it anymore. The theme author commited the /resources/ directory so now the theme runs even with Hugo Basic.

Thank You for your help! As you probably know, I am not well versed in implementing Hugo Themes. I really want to learn but find it difficult and confusing making progress.
Please let me know if the steps below have some sort of mistake.


[root@fedora28 ktst]# 
[root@fedora28 ktst]# mkdir huz
[root@fedora28 ktst]# cd huz
[root@fedora28 huz]# hugo version
Hugo Static Site Generator v0.47.1 linux/amd64 BuildDate: 2018-08-20T08:16:52Z
[root@fedora28 huz]# hugo new site my-site && cd my-site
Congratulations! Your new Hugo site is created in /home/ktst/huz/my-site.

Just a few more steps and you're ready to go:

1. Download a theme into the same-named folder.
   Choose a theme from https://themes.gohugo.io/, or
   create your own with the "hugo new theme <THEMENAME>" command.
2. Perhaps you want to add some content. You can add single files
   with "hugo new <SECTIONNAME>/<FILENAME>.<FORMAT>".
3. Start the built-in live server via "hugo server".

Visit https://gohugo.io/ for quickstart guide and full documentation.
[root@fedora28 my-site]# git clone https://github.com/lucperkins/hugo-fresh themes/hugo-fresh
Cloning into 'themes/hugo-fresh'...
remote: Counting objects: 264, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 264 (delta 1), reused 8 (delta 1), pack-reused 252
Receiving objects: 100% (264/264), 714.75 KiB | 2.71 MiB/s, done.
Resolving deltas: 100% (68/68), done.
[root@fedora28 my-site]# rm config.toml
rm: remove regular file 'config.toml'? y
[root@fedora28 my-site]# curl -O https://raw.githubusercontent.com/lucperkins/hugo-fresh/master/exampleSite/config.yaml
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  5250  100  5250    0     0  23755      0 --:--:-- --:--:-- --:--:-- 23755
[root@fedora28 my-site]# hugo server
Building sites … ERROR 2018/08/26 12:39:24 error: failed to transform resource: TOCSS: failed to transform "style.sass" (text/x-sass): this feature is not available in your current Hugo version
Total in 18 ms
Error: Error building site: logged 1 error(s)
[root@fedora28 my-site]# pwd
/home/ktst/huz/my-site
[root@fedora28 my-site]# ls -ltr
total 36
drwxr-xr-x 2 root root 4096 Aug 26 12:38 static
drwxr-xr-x 2 root root 4096 Aug 26 12:38 layouts
drwxr-xr-x 2 root root 4096 Aug 26 12:38 data
drwxr-xr-x 2 root root 4096 Aug 26 12:38 content
drwxr-xr-x 2 root root 4096 Aug 26 12:38 archetypes
drwxr-xr-x 3 root root 4096 Aug 26 12:38 themes
-rw-r--r-- 1 root root 5250 Aug 26 12:39 config.yaml
drwxr-xr-x 2 root root 4096 Aug 26 12:39 resources
[root@fedora28 my-site]# ls -ltr ./themes
total 4
drwxr-xr-x 9 root root 4096 Aug 26 12:38 hugo-fresh
[root@fedora28 my-site]# rm -rf ./themes
[root@fedora28 my-site]# find . -name themes -print
[root@fedora28 my-site]# pwd
/home/ktst/huz/my-site
[root@fedora28 my-site]# git clone https://github.com/lucperkins/hugo-fresh themes/hugo-fresh
Cloning into 'themes/hugo-fresh'...
remote: Counting objects: 264, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 264 (delta 1), reused 8 (delta 1), pack-reused 252
Receiving objects: 100% (264/264), 714.75 KiB | 1.46 MiB/s, done.
Resolving deltas: 100% (68/68), done.
[root@fedora28 my-site]# ls -lrt
total 36
drwxr-xr-x 2 root root 4096 Aug 26 12:38 static
drwxr-xr-x 2 root root 4096 Aug 26 12:38 layouts
drwxr-xr-x 2 root root 4096 Aug 26 12:38 data
drwxr-xr-x 2 root root 4096 Aug 26 12:38 content
drwxr-xr-x 2 root root 4096 Aug 26 12:38 archetypes
-rw-r--r-- 1 root root 5250 Aug 26 12:39 config.yaml
drwxr-xr-x 2 root root 4096 Aug 26 12:39 resources
drwxr-xr-x 3 root root 4096 Aug 26 12:42 themes
[root@fedora28 my-site]# find . -name config.toml -print
[root@fedora28 my-site]# grep theme config.yaml
theme: hugo-fresh
[root@fedora28 my-site]# hugo server
Building sites … ERROR 2018/08/26 12:44:28 error: failed to transform resource: TOCSS: failed to transform "style.sass" (text/x-sass): this feature is not available in your current Hugo version
Total in 14 ms
Error: Error building site: logged 1 error(s)
[root@fedora28 my-site]# 

As suggested, I installed Hugo Extended and was finally successful building this Theme, by following the instructions.

I do not know what Hugo Extended does, whether it is a testing version or under what circumstances one would use it, but in this case it works. Is Hugo Extended the recommended product to use for Theme testing?

I am sorry this has taken such an effort, but also concerned others may affected by this in the future.

From my point of view, if one can not install a Theme using the instructions provided in the Theme, then it should be flagged or removed. But I am just a Hugo novice. On to actually working with the Theme. :slight_smile:

Thanks.