hexo-generator-optimize

0.1.3 • Public • Published

Hexo Plugin to Optimize Website Files for Deployment

Generator for Hexo that optimizes css, js, html, and imgages + optionally deploys your site.

CLI Usage

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

Generate, then Optimize, then optional deploy (-d flag)

Config Options

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

optimize:
  # Defaults
  image_min: true
  css_concat: true
  css_min: true
  js_concat: true
  js_min: true
  html_min: true
  gzip: true

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

# 1. For Github
deploy:
  type: github
  repo: <repository url>
  branch: [branch]

# 2. For Heroku
deploy:
  type: heroku
  repo: <repository url>

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

# 4. For OpenShift DIY Cartridge
deploy:
  type: openshift
  remote: <upstream git remote>
  branch: [upstream git branch] # Default is master

Package Sidebar

Install

npm i hexo-generator-optimize

Weekly Downloads

0

Version

0.1.3

License

LGPL

Last publish

Collaborators

  • abstracthat