github hexojs/hexo 3.2.0

latest releases: v7.2.0, v7.1.1, v7.1.0...
8 years ago

Templates precompilation da241ac

Theme templates are precompiled if possible. It makes generation speed faster. The following renderers have already supported this feature.

And it's easy to implement precompilation for renderers. Just add a compile function to the renderer. Take EJS renderer for example:

var ejs = require('ejs');
var assign = require('object-assign');

function ejsRenderer(data, locals) {
  return ejs.render(data.text, assign({filename: data.path}, locals));
}

ejsRenderer.compile = function(data) {
  return ejs.compile(data.text, {
    filename: data.path
  });
};

module.exports = ejsRenderer;

New

  • Allow specify plugin list in config #1670 f6407dc

    If you set plugins list in _config.yml. Hexo will not detect plugin list automatically.

    plugins:
      - my-plugin
  • open_graph helper: Add support for twitter:image #1681 e4a5204

  • open_graph helper: Add support for keywords #1683 a0888fa

  • codeblock tag: Add mark option #1766 60cc43c

Update

  • Remove unneccessary refs to type attr in helper output snippets #1706 93fcdb5
  • Remove commands which exist in hexo-cli f5c3b40
  • Replace Swig in post.create with Nunjucks 35342cb

Fixed

Don't miss a new hexo release

NewReleases is sending notifications on new releases.