Compress the static resources of the Hexo blog
Foreword When I was looking at the html files of Hexo blog recently, I suddenly found that there were many spaces and newlines in these html files. It was uncomfortable to look at them, but I could not bear it. As shown below, there are many new lines, which are uncomfortable to look at and slow down the loading speed of the blog. To find a solution, Baidu first looks for relevant information. Well, there are two popular methods. One is to use Hexo next, the code compression plug-in of Hexo, for configuration. The advantage is that no complex configuration is required. After installation, set several parameters. The file generated when executing the Hexo g command is compressed. However, I used it without effect, and the reason is unknown, Laziness failed. Another is to use Gulp to compress the code, and then push it to the server after the compression is completed. The disadvantage is that the configuration is complex, and multiple software packages are needed