jarrekk / Jalpc

🍎Jalpc -- A flexible Jekyll theme, 3 steps to build your website.
https://jarrekk.github.io/Jalpc/
MIT License
1.02k stars 1.1k forks source link

SCSS enhancement for local build #85

Open rosscyoga opened 7 years ago

rosscyoga commented 7 years ago

First off, thanks for all your work! Really love the ease of build using your framework!

I'd like to continue to use Jalpc for other projects and would like the capability of modifying SCSS file with live updating on the local server. I added my own custom.css file to the "static/assets/css" folder and added it to the file.conf.js file. Works great except that I am limited to CSS and that it doesn't offer live updating unless I'm missing something. When I make a change, I stop "bundle exec jekyll serve" (Windows 10, ugh...) and run "npm run build" to rebuild the minified CSS.

I really prefer using SCSS, which seems to be built in, but I haven't been able to get it to work on top of the serve command.

Requested Local Workflow:

  1. Start jekyll serve/watch (using enhanced method)
  2. _sass/_custom.scss - modify
  3. CSS is compiled from SCSS (automatic)
  4. CSS is minified into build (automatic)
  5. Site updates live on local

Any help would be appreciated!

jarrekk commented 7 years ago

Thanks for this advice, SCSS is better for changing some styles with established styles, since Jekyll can auto generate static files to _site folder with command jekyll server [--watch] and Jekyll support SCSS, I think you can add your customised SCSS files like this example, but you need to add CSS files which compiled from SCSS files to HTML header and it can't be compressed by node package.

Later I will add this feature for others to customise Jalpc conveniently and make CSS compress work together with SCSS.