space-jekyll-template icon indicating copy to clipboard operation
space-jekyll-template copied to clipboard

modified style wasn't update on github page

Open ducva opened this issue 7 years ago • 1 comments

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 }))
})

ducva avatar Sep 17 '18 22:09 ducva

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

berserker1 avatar May 30 '19 11:05 berserker1