From fb0335954f2fe8d6dd03e9212a58c9dd0e182489 Mon Sep 17 00:00:00 2001 From: LIN HONG Date: Wed, 22 Sep 2021 11:57:50 +0800 Subject: [PATCH] feat: custom css --- _config.yml | 2 +- gulpfile.js | 17 ++++++++++++----- layout/_partial/head.ejs | 2 ++ source/dist/build.css | 4 ++-- source/dist/custom.css | 1 + 5 files changed, 18 insertions(+), 8 deletions(-) mode change 100644 => 100755 source/dist/build.css create mode 100644 source/dist/custom.css diff --git a/_config.yml b/_config.yml index c452bf9..25ef2a4 100644 --- a/_config.yml +++ b/_config.yml @@ -1,4 +1,4 @@ -version: 1630473019367 +version: 1632282865958 language: cn aomori_widgets: - toc diff --git a/gulpfile.js b/gulpfile.js index 9dc3090..890a84a 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -36,10 +36,9 @@ const fs = require('fs'); /* -------------------------------------------------------- */ /* ------------------------ CSS ------------------------- */ -gulp.task('css', function () { - return gulp +gulp.task('css', async function () { + gulp .src([ - 'source/stylesheets/base.scss', 'source/stylesheets/normalize.css', 'source/stylesheets/spectre.min.css', 'source/stylesheets/spectre-exp.min.css', @@ -52,7 +51,15 @@ gulp.task('css', function () { 'source/stylesheets/swiper-bundle.min.css', 'source/stylesheets/plyr.css', 'source/stylesheets/remark42.css', - 'source/stylesheets/post.css', + 'source/stylesheets/post.css' + ]) + .pipe(concat('build.css')) + .pipe(cleanCSS()) + .pipe(gulp.dest('source/dist')) + + gulp + .src([ + 'source/stylesheets/base.scss', 'source/stylesheets/style.scss', ]) .pipe( @@ -66,7 +73,7 @@ gulp.task('css', function () { }) ) .pipe(autoprefixer('last 2 version')) - .pipe(concat('build.css')) + .pipe(concat('custom.css')) .pipe(cleanCSS()) .pipe(gulp.dest('source/dist')) }) diff --git a/layout/_partial/head.ejs b/layout/_partial/head.ejs index 63f5795..7d4b69f 100644 --- a/layout/_partial/head.ejs +++ b/layout/_partial/head.ejs @@ -51,6 +51,8 @@ <%- css(`/dist/build.css?v=${theme.version}`) %> + <%- css(`/dist/custom.css?v=${theme.version}`) %> +