mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-12-30 03:23:15 +00:00
Improve local datetime display
- Protect author's location privacy - Reduce locale configuration parameters
This commit is contained in:
@@ -11,7 +11,7 @@ const insert = require('gulp-insert');
|
||||
const fs = require('fs');
|
||||
|
||||
const JS_SRC = '_javascript';
|
||||
const JS_DEST = `assets/js/dist/`;
|
||||
const JS_DEST = `assets/js/dist`;
|
||||
|
||||
function concatJs(files, output) {
|
||||
return src(files)
|
||||
@@ -72,12 +72,21 @@ const pageJs = () => {
|
||||
);
|
||||
};
|
||||
|
||||
const miscJs = () => {
|
||||
return concatJs([
|
||||
`${JS_SRC}/commons/*.js`,
|
||||
`${JS_SRC}/utils/locale-datetime.js`
|
||||
], 'misc'
|
||||
);
|
||||
};
|
||||
|
||||
// GA pageviews report
|
||||
const pvreportJs = () => {
|
||||
return concatJs(`${JS_SRC}/utils/pageviews.js`, 'pvreport');
|
||||
};
|
||||
|
||||
const buildJs = parallel(commonsJs, homeJs, postJs, categoriesJs, pageJs, pvreportJs);
|
||||
const buildJs = parallel(
|
||||
commonsJs, homeJs, postJs, categoriesJs, pageJs, miscJs, pvreportJs);
|
||||
|
||||
exports.build = series(buildJs, minifyJs);
|
||||
|
||||
@@ -86,8 +95,7 @@ exports.liveRebuild = () => {
|
||||
|
||||
watch([
|
||||
`${ JS_SRC }/commons/*.js`,
|
||||
`${ JS_SRC }/utils/*.js`,
|
||||
`${ JS_SRC }/lib/*.js`
|
||||
`${ JS_SRC }/utils/*.js`
|
||||
],
|
||||
buildJs
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user