🇨🇦
hexo-theme-redefine
BlogGithub
English
English
  • Project Description
  • Get Started
    • Installation
    • Update
    • Usage
  • Configuration
    • Create a theme config file
    • base_info
    • style
      • primary_color
      • avatar
      • favicon
      • article_img_align
      • left_side_width
      • content_max_width
      • nav_color
      • hover
      • first_screen
      • scroll
    • social_contact
    • menu
    • home_article
    • post
      • word_count
      • author_label
    • toc
    • copyright_info
    • website_count
    • local_search
    • comment
      • use
      • Waline
      • Gitalk
      • Twikoo
    • rss
    • lazyload
    • cdn
    • pjax
    • footer
  • Advanced
    • Create a page
    • Note modules
    • Article top
    • Mathematical formula
    • Friendship style
    • file comparison
    • Resource compression
Powered by GitBook
On this page
  1. Advanced

Resource compression

Previousfile comparison

Last updated 2 years ago

In the source code of the Redefine theme, resource files such as HTML, CSS, JavaScript, and images are not packaged and compressed. The same is true for most Hexo themes. Fortunately, related plugins can be found to solve this problem.

Here you can use the plugin, which integrates html-minifier, clean-css, uglify and imagemin `, install and simple configuration to use.

  1. Install hexo-all-minifier in the root directory of the Hexo project.

    $ npm install hexo-all-minifier
  2. In the Hexo configuration file _config.yml , add the following configuration items:

    all_minifier: true

    If you have problems using the plugin or want to do more detailed settings, please check the plugin's .

hexo-all-minifier
documentation