victorvoid / space-jekyll-template

A simple spacemacs template on jekyll. https://victorvoid.github.io/space-jekyll-template/
Other
400 stars 324 forks source link

modified style wasn't update on github page #35

Open ducva opened 6 years ago

ducva commented 6 years ago

Hi,

I tried to modify some styles in stylus files. It worked well on my localhost. But when I push to github, my modifications were gone.

Can you explain how Github build our sites with gulp?

Edit 1:

I found a problem in gulpfile.js

gulp.task('stylus', function() {
  gulp
    .src('src/styl/main.styl')
    .pipe(plumber())
    .pipe(
      stylus({
        use: [koutoSwiss(), prefixer(), jeet(), rupture()],
        compress: true,
      })
    )
    .pipe(gulp.dest('_site/assets/css/'))
    .pipe(browserSync.reload({ stream: true }))
    .pipe(gulp.dest('assets/css'))
})

Currently, pipe to 'assets/css' is after pipe(browserSync) and there is no main.css file created in 'assets/css'. But if I move it up, pip to 'assets/css' before pipe(browserSync), it's ok

gulp.task('stylus', function() {
  gulp
    .src('src/styl/main.styl')
    .pipe(plumber())
    .pipe(
      stylus({
        use: [koutoSwiss(), prefixer(), jeet(), rupture()],
        compress: true,
      })
    )
    .pipe(gulp.dest('_site/assets/css/'))
    .pipe(gulp.dest('assets/css'))
    .pipe(browserSync.reload({ stream: true }))
})
berserker1 commented 5 years ago

@ducva your modification seems to work in my case, thanks