GithubHelp home page GithubHelp logo

etoxin / hexo-generator-optimize Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jackyren/hexo-generator-optimize

0.0 2.0 0.0 4.58 MB

Hexo plugin that optimizes (concat/min/gzip/img-min) and optionally deploys your site

JavaScript 100.00%

hexo-generator-optimize's Introduction

Hexo Plugin to Optimize Website Files for Deployment

Generator for Hexo that optimizes CSS, JS, HTML, and imgages + optionally deploys your site.

Your CSS and JS gets saved and inserted into your HTML as main.min.css and main.min.js with a cache-busting query string appended. We skip any CDN links.

Notice

concatenate seems doesn't work well , if you deploy with nginx I'm trying to review the code and fix the bugs.

Command Line Usage

To generate, then optimize, and optionally deploy (-d flag)...

hexo optimize -d
# or aliases...
hexo o #hexo optimize
hexo od #hexo optimize -d

Config Options

In Hexo's _config.yml you can set the following options...

optimize:
  # Defaults
  image_min: true
    optimizationLevel: 4
  css_concat: true
  css_min: true
  js_concat: true
  js_min: true
  html_min: true
    removeComments: true
    removeCommentsFromCDATA: true
    collapseWhitespace: true
    collapseBooleanAttributes: true
    removeEmptyAttributes: true
  gzip: true

If you want to deploy be sure to set up one of the deployment options in your config as well.

deploy:
  type: rsync
  host: <host>
  user: <user>
  root: <root>
  port: [port] # Default is 22
  delete: [true|false] # Default is true

hexo-generator-optimize's People

Contributors

abstracthat avatar etoxin avatar htynkn avatar jackyren avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.