layout从哪边来
new.js
1 | var data = { |
post.js
1 | //默认layout为post |
hexo-front-matter/front_matter.js
1 | var split = yfm.split(scaffold); |
1 | var frontMatter = prepareFrontMatter(_.clone(data)); |
最后调用 swig模板引擎 编译splitedata对象
1 | var renderedData = swig.compile(split.data)(frontMatter); |