{"action":"created","issue":{"url":"https://api.github.com/repos/hexojs/hexo/issues/1333","labels_url":"https://api.github.com/repos/hexojs/hexo/issues/1333/labels{/name}","comments_url":"https://api.github.com/repos/hexojs/hexo/issues/1333/comments","events_url":"https://api.github.com/repos/hexojs/hexo/issues/1333/events","html_url":"https://github.com/hexojs/hexo/issues/1333","id":87321408,"number":1333,"title":"无论skip_render如何设置都无法跳过source目录下的某个js文件目录，生成出错","user":{"login":"blueyi","id":6254020,"avatar_url":"https://avatars.githubusercontent.com/u/6254020?v=3","gravatar_id":"","url":"https://api.github.com/users/blueyi","html_url":"https://github.com/blueyi","followers_url":"https://api.github.com/users/blueyi/followers","following_url":"https://api.github.com/users/blueyi/following{/other_user}","gists_url":"https://api.github.com/users/blueyi/gists{/gist_id}","starred_url":"https://api.github.com/users/blueyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blueyi/subscriptions","organizations_url":"https://api.github.com/users/blueyi/orgs","repos_url":"https://api.github.com/users/blueyi/repos","events_url":"https://api.github.com/users/blueyi/events{/privacy}","received_events_url":"https://api.github.com/users/blueyi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-11T12:02:00Z","updated_at":"2015-06-11T17:12:18Z","closed_at":null,"body":"hexo 3.x版本，具体版本号下面贴出，将这个代码<https://github.com/jserme/mahua>放进source目录后，无论skip_render参数如何设置，无论系统是linux还是windows，执行hexo g的时候都会出现如下错误：\r\n\r\n```\r\nE:\\blog>hexo g\r\nFATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/do\r\ncs/troubleshooting.html\r\nTemplate render error: expected variable end\r\n    at Error.exports.TemplateError (E:\\blog\\node_modules\\hexo\\node_modules\\nunju\r\ncks\\src\\lib.js:51:19)\r\n    at Object.extend.fail (E:\\blog\\node_modules\\hexo\\node_modules\\nunjucks\\src\\p\r\narser.js:64:15)\r\n    at Object.extend.advanceAfterVariableEnd (E:\\blog\\node_modules\\hexo\\node_mod\r\nules\\nunjucks\\src\\parser.js:133:18)\r\n    at Object.extend.parseNodes (E:\\blog\\node_modules\\hexo\\node_modules\\nunjucks\r\n\\src\\parser.js:1159:22)\r\n    at Object.extend.parseAsRoot (E:\\blog\\node_modules\\hexo\\node_modules\\nunjuck\r\ns\\src\\parser.js:1177:42)\r\n    at Object.module.exports.parse (E:\\blog\\node_modules\\hexo\\node_modules\\nunju\r\ncks\\src\\parser.js:1199:18)\r\n    at Object.module.exports.compile (E:\\blog\\node_modules\\hexo\\node_modules\\nun\r\njucks\\src\\compiler.js:1118:48)\r\n    at Obj.extend._compile (E:\\blog\\node_modules\\hexo\\node_modules\\nunjucks\\src\\\r\nenvironment.js:444:35)\r\n    at Obj.extend.compile (E:\\blog\\node_modules\\hexo\\node_modules\\nunjucks\\src\\e\r\nnvironment.js:433:18)\r\n    at null.<anonymous> (E:\\blog\\node_modules\\hexo\\node_modules\\nunjucks\\src\\env\r\nironment.js:378:22)\r\n    at Object.exports.withPrettyErrors (E:\\blog\\node_modules\\hexo\\node_modules\\n\r\nunjucks\\src\\lib.js:24:16)\r\n    at Obj.extend.render (E:\\blog\\node_modules\\hexo\\node_modules\\nunjucks\\src\\en\r\nvironment.js:374:20)\r\n    at Obj.extend.renderString (E:\\blog\\node_modules\\hexo\\node_modules\\nunjucks\\\r\nsrc\\environment.js:261:21)\r\n    at E:\\blog\\node_modules\\hexo\\lib\\extend\\tag.js:56:9\r\n    at tryCatcher (E:\\blog\\node_modules\\hexo\\node_modules\\bluebird\\js\\main\\util.\r\njs:24:31)\r\n    at Promise._resolveFromResolver (E:\\blog\\node_modules\\hexo\\node_modules\\blue\r\nbird\\js\\main\\promise.js:427:31)\r\n    at new Promise (E:\\blog\\node_modules\\hexo\\node_modules\\bluebird\\js\\main\\prom\r\nise.js:53:37)\r\n    at Tag.render (E:\\blog\\node_modules\\hexo\\lib\\extend\\tag.js:55:10)\r\n    at E:\\blog\\node_modules\\hexo\\lib\\hexo\\post.js:320:16\r\n    at tryCatcher (E:\\blog\\node_modules\\hexo\\node_modules\\bluebird\\js\\main\\util.\r\njs:24:31)\r\n    at Promise._settlePromiseFromHandler (E:\\blog\\node_modules\\hexo\\node_modules\r\n\\bluebird\\js\\main\\promise.js:454:31)\r\n    at Promise._settlePromiseAt (E:\\blog\\node_modules\\hexo\\node_modules\\bluebird\r\n\\js\\main\\promise.js:530:18)\r\n    at Async._drainQueue (E:\\blog\\node_modules\\hexo\\node_modules\\bluebird\\js\\mai\r\nn\\async.js:182:12)\r\n    at Async._drainQueues (E:\\blog\\node_modules\\hexo\\node_modules\\bluebird\\js\\ma\r\nin\\async.js:187:10)\r\n    at Immediate.Async.drainQueues [as _onImmediate] (E:\\blog\\node_modules\\hexo\\\r\nnode_modules\\bluebird\\js\\main\\async.js:15:14)\r\n    at processImmediate [as _immediateCallback] (timers.js:358:17)\r\n\r\n```\r\nhexo 版本号：\r\n```\r\nE:\\blog>hexo --version\r\nhexo: 3.0.1\r\nos: Windows_NT 6.3.9600 win32 x64\r\nhttp_parser: 2.3\r\nnode: 0.12.4\r\nv8: 3.28.71.19\r\nuv: 1.5.0\r\nzlib: 1.2.8\r\nmodules: 14\r\nopenssl: 1.0.1m\r\n```\r\n\r\n具体情况及讨论内容见http://xuanwo.org/2014/08/14/hexo-usual-problem/#comment-2073484518\r\n\r\n之前使用hexo 2.8没有遇到这个问题，谢谢"},"comment":{"url":"https://api.github.com/repos/hexojs/hexo/issues/comments/111210264","html_url":"https://github.com/hexojs/hexo/issues/1333#issuecomment-111210264","issue_url":"https://api.github.com/repos/hexojs/hexo/issues/1333","id":111210264,"user":{"login":"Xuanwo","id":5351546,"avatar_url":"https://avatars.githubusercontent.com/u/5351546?v=3","gravatar_id":"","url":"https://api.github.com/users/Xuanwo","html_url":"https://github.com/Xuanwo","followers_url":"https://api.github.com/users/Xuanwo/followers","following_url":"https://api.github.com/users/Xuanwo/following{/other_user}","gists_url":"https://api.github.com/users/Xuanwo/gists{/gist_id}","starred_url":"https://api.github.com/users/Xuanwo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Xuanwo/subscriptions","organizations_url":"https://api.github.com/users/Xuanwo/orgs","repos_url":"https://api.github.com/users/Xuanwo/repos","events_url":"https://api.github.com/users/Xuanwo/events{/privacy}","received_events_url":"https://api.github.com/users/Xuanwo/received_events","type":"User","site_admin":false},"created_at":"2015-06-11T17:12:18Z","updated_at":"2015-06-11T17:12:18Z","body":"```\r\n  it('skip render', function(){\r\n    hexo.config.skip_render = 'lab/**/*.js';\r\n\r\n    return Page.insert({\r\n      source: 'lab/assets/jquery.min.js',\r\n      path: 'lab/assets/jquery.min.js',\r\n      layout: false,\r\n      raw: 'jquery raw'\r\n    }).then(function(page){\r\n      return generator(locals()).then(function(data){\r\n        data.should.eql([\r\n          {path: page.source, data: page.raw}\r\n        ]);\r\n\r\n        hexo.config.skip_render = [];\r\n        return page.remove();\r\n      });\r\n    });\r\n  });\r\n\r\n  it('skip render - multiple rules', function(){\r\n    hexo.config.skip_render = ['lab/**/*.js'];\r\n\r\n    return Page.insert({\r\n      source: 'lab/assets/jquery.min.js',\r\n      path: 'lab/assets/jquery.min.js',\r\n      layout: false,\r\n      raw: 'jquery raw'\r\n    }).then(function(page){\r\n      return generator(locals()).then(function(data){\r\n        data.should.eql([\r\n          {path: page.source, data: page.raw}\r\n        ]);\r\n\r\n        hexo.config.skip_render = [];\r\n        return page.remove();\r\n      });\r\n    });\r\n  });\r\n\r\n  it('skip render - don\\'t replace extension name', function(){\r\n    hexo.config.skip_render = 'README.md';\r\n\r\n    return Page.insert({\r\n      source: 'README.md',\r\n      path: 'README.html',\r\n      layout: 'page',\r\n      raw: 'readme raw'\r\n    }).then(function(page){\r\n      return generator(locals()).then(function(data){\r\n        data.should.eql([\r\n          {path: page.source, data: page.raw}\r\n        ]);\r\n\r\n        hexo.config.skip_render = [];\r\n        return page.remove();\r\n      });\r\n    });\r\n  });\r\n```\r\n\r\n我去源码翻了好久，发现了这些，我在想，是不是需要指定后缀名？以及在输入多个目录的时候，我们是不是要使用js的数组形式输入？我来验证一下。"}}