Giter Site home page Giter Site logo

Comments (9)

khos2ow avatar khos2ow commented on May 19, 2024 3

@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.

from hugo-coder.

rdhox avatar rdhox commented on May 19, 2024 1

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

from hugo-coder.

luizdepra avatar luizdepra commented on May 19, 2024

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.

from hugo-coder.

rdhox avatar rdhox commented on May 19, 2024

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.

from hugo-coder.

luizdepra avatar luizdepra commented on May 19, 2024

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.

from hugo-coder.

rdhox avatar rdhox commented on May 19, 2024

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!

from hugo-coder.

luizdepra avatar luizdepra commented on May 19, 2024

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.

from hugo-coder.

rdhox avatar rdhox commented on May 19, 2024

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’t 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!

from hugo-coder.

luizdepra avatar luizdepra commented on May 19, 2024

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

from hugo-coder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.