Hugo-coder: Pulling submodule to get new version don't work

Created on 5 Sep 2018  路  9Comments  路  Source: luizdepra/hugo-coder

Hello everyone !
I got my website with coder theme on folder themes/coder that I versioned with submodule.
To have the last version of coder I enter as usual:

git submodule update --recursive --remote

But the folder assets/scss refuse to download and I have a website without any css now.
I checked for 2 hours if it was not a git misunderstanding, but can't find any, always worked before... Any ideas about that?

Thanks!

Most helpful comment

@rdhox I put together this wrapper which you might want to look at. https://github.com/khos2ow/hugo-wrapper/
Essentially you will be able to control which version of Hugo you want, extended version or not, only by keeping track of one file in your repo .hugo/version. example content would be:

0.48

or

0.48/extended

the corresponding hugo binary for your platform for that particular version will be downloaded on the fly from official GitHub releases.

All 9 comments

Are you using Hugo v0.43+extended or later?
You will need the extended version to build CSS from SCSS every time a style update happens.
Also, you can, and should, add the resources into your repo. So, you won't need to use Hugo's extended version every time build your site.

Ok I feel like a moron... The folder assets/scss was there, it's just that visual code was not refreshing files... Anyway my version of Hugo is v0.48/extended so I guess it's ok, but I still don't understand how it's work... I went through the code to see the change, but how I make hugo build the css from the scss?

I also don't understand this sentence : "add the resources into your repo. So, you won't need to use Hugo's extended version every time build your site."

What exactly do you mean?

Sorry I'm a little lost with this change, i went to check the doc of Hugo Pipes and haven't found any clue.

To build the CSS you just need to build your site. Run hugo and done.
Sorry, I wrote that sentence in a rush. What I mean is: You don't need to rebuild the CSS files, using the extended version, every time you change the content of your site. You can build the CSS one time with the extended version, commit the resources folder into your project and keep using the non-extended version after that. The resources folder holds all generate files, BTW.

But, you might not need to do that. If you can always use the extended version, keep using it. In my case, I'm using Netlify and they don't support the extended version yet. So, I need to generate the resources folder in my local machine and add the folder into my repo.

Thanks, I understand better now I'm also a Netlify user, so I will do like you said!
But I have still a problem. Running hugobuild my website, create the folder resources but generate no css at all and the resources folder is empty. Do I have to run hugo with some option?

Thanks again!

Yeah, Just hugo should do it.

So, there is nothing like this in your site? https://github.com/luizdepra/luizdepra.github.io/tree/master/resources/_gen/assets/scss/scss

I can try to build your site later today and see what happens.

ok I apparently find the reason :

_Hugo is now released with two binary version: One with and one without SCSS/SASS support. At the time of writing, this is only available in the binaries on the GitHub release page. Brew, Snap builds etc. will come. But note that you only need the extended version if you want to edit SCSS. For your CI server, or if you don鈥檛 use SCSS, you will most likely want the non-extended version._

I gonna install Hugo with the binaries on Github and not with Brew, and see what happen!

@rdhox I put together this wrapper which you might want to look at. https://github.com/khos2ow/hugo-wrapper/
Essentially you will be able to control which version of Hugo you want, extended version or not, only by keeping track of one file in your repo .hugo/version. example content would be:

0.48

or

0.48/extended

the corresponding hugo binary for your platform for that particular version will be downloaded on the fly from official GitHub releases.

It is solved, right? I'm closing this issue.

Sorry I got very busy on a project. Yes I will figured it out, thank for all your help!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Mike-E-angelo picture Mike-E-angelo  路  3Comments

luizdepra picture luizdepra  路  7Comments

davhin picture davhin  路  5Comments

clement-pannetier picture clement-pannetier  路  3Comments

swarnalee picture swarnalee  路  4Comments