Skip to content

Instantly share code, notes, and snippets.

@ntot
ntot / index.js
Created April 21, 2017 22:47
Tipue Hexo Search
var util = require('hexo-util');
hexo.extend.generator.register('tipue-search-json', hexo_generator_tipue_search_json);
function hexo_generator_tipue_search_json(site) {
var minify = function (str) {
return util.stripHTML(str).trim().replace(/\n/g, ' ').replace(/\s+/g, ' ');
},
keys = {