Skip to content

Commit

Permalink
feat: custom css
Browse files Browse the repository at this point in the history
  • Loading branch information
lh1me committed Sep 22, 2021
1 parent 8e0fb1a commit fb03359
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 1630473019367
version: 1632282865958
language: cn
aomori_widgets:
- toc
Expand Down
17 changes: 12 additions & 5 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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(
Expand All @@ -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'))
})
Expand Down
2 changes: 2 additions & 0 deletions layout/_partial/head.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@

<%- css(`/dist/build.css?v=${theme.version}`) %>

<%- css(`/dist/custom.css?v=${theme.version}`) %>

<script>
window.isPost = <%- is_post() %>
window.aomori = {
Expand Down
4 changes: 2 additions & 2 deletions source/dist/build.css
100644 → 100755

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions source/dist/custom.css

Large diffs are not rendered by default.

0 comments on commit fb03359

Please sign in to comment.