Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Hyde-Hyde to use Hugo pipes for scss #45

Merged
merged 1 commit into from
Oct 10, 2018
Merged

Conversation

jd4no
Copy link

@jd4no jd4no commented Oct 9, 2018

I updated the hyde-hyde theme to be able to use the scss files directly in development and into production with out needing an external preprocessor. This patch allows the css to be generated directly from the scss files using Hugo pipes. Only the called scss files will be added to the outdir static folder.

I also removed the now unused css and css.map files since these files will be generated at compile time.

This patch allows for faster development since the scss files are watched and recompiled directly when running hugo server as well as removing tech debt from needing to know that the theme's scss files need to be manually preprocessed into css.

@htr3n
Copy link
Owner

htr3n commented Oct 9, 2018

@jd4no many thanks for your time and the PR.

A quick question though: Have you checked the issue with sourcemaps when using Hugo pipes? Last time I checked and used Hugo pipes, it messed up the sourcemaps badly (i.e. the generated CSS rules in the browser cannot refer back to the source SCSSs).

I have tried both approaches, using Hugo pipes vs. using external tools, as written here in my blog: https://htr3n.github.io/2018/07/minimal-hugo-workflow and ended up with using Gulp to handle sourcemaps properly. The only caveat with external tools like Gulp, that I have not had enough time to solve, is cache busting.

How's your experience?

Cheers,
Huy

@jd4no
Copy link
Author

jd4no commented Oct 9, 2018 via email

@htr3n
Copy link
Owner

htr3n commented Oct 9, 2018

@jd4no that sounds great. I am on the move and will have a closer look. Btw, why don't you also add cache busting/finger printing into your suggested resource pipes?

@jd4no
Copy link
Author

jd4no commented Oct 10, 2018

Hmm... Thats an excellent question. Honestly I just didn't think about it, but its a good idea. If you want I can resubmit with that change.
I could also add a concat to a single styles.css file if you like, or we can keep them separate to be more clear.

@jd4no
Copy link
Author

jd4no commented Oct 10, 2018

Ok, I added in fingerprinting. I did not add concatenation since some of the styles are only included with conditionals.

@htr3n htr3n merged commit 56d21df into htr3n:master Oct 10, 2018
cyberflamingo pushed a commit to cyberflamingo/hyde-hyde that referenced this pull request Jul 30, 2019
Updated Hyde-Hyde to use Hugo pipes for scss
nankeen pushed a commit to nankeen/hyde-hyde that referenced this pull request Apr 22, 2020
Updated Hyde-Hyde to use Hugo pipes for scss
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants