There should be no unnecessary line breaks.
In fact, there are extra line breaks.
See the screenshot attached to this issue.
NexT Version:
NexT Scheme:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36

you can use gulp-htmlclean and gulp-htmlmin to solve your problem !
npm install gulp-htmlmin --save-dev
npm install gulp-htmlclean --save-dev
gulp-htmlmin--压缩html,可以压缩页面javascript、css,去除页面空格、注释,删除多余属性等操作文档gulp-htmlclean-- null(HexoRoot)/gulpfile.js
var gulp = require('gulp');
var htmlmin = require('gulp-htmlmin');
var htmlclean = require('gulp-htmlclean');
//
gulp.task('minify-html', function() {
return gulp.src('./public/**/*.html')
.pipe(htmlclean())
.pipe(htmlmin({
removeComments: true,
minifyJS: true,
minifyCSS: true,
minifyURLs: true,
}))
.pipe(gulp.dest('./public'))
});
// default task
gulp.task('default', [
'minify-html'
]);
run this command
the end ~
good idea
HTML minification plugins may help in this. Also, this is not big problem with this line breaks and search engines do not see this. So, no need to do this for now, need to do other great and usable things instead this.
Most helpful comment
you can use gulp-htmlclean and gulp-htmlmin to solve your problem !
gulp-htmlmin--压缩html,可以压缩页面javascript、css,去除页面空格、注释,删除多余属性等操作文档gulp-htmlclean-- null(HexoRoot)/gulpfile.js
run this command
the end ~