在我的 Wintersmith 构建的站点中,我想要:
- index.html 包含新闻提要
- 包含博客索引的 blog.html
我将 paginator.coffee 复制到 newspaginator.coffee 中,对其进行了调整以返回“新闻”而不是“文章”,并进行了一些其他调整,它工作正常。
然后我尝试重新添加原始分页器,并在 config.json 中使用一些参数:
"plugins": [
"./plugins/newspaginator.coffee",
"./plugins/paginator.coffee"
],
"newspaginator": {
"articles": "news",
"perPage": 10
},
"paginator": {
"articles": "articles",
"template": "blog.jade",
"first": "blog.html",
"filename": "blogpage/%d/index.html",
"perPage": 3
}
现在:我只获得第二个插件的 HTML 页面。如上所述,我得到 blog.html 但没有 index.html。如果我颠倒这两个插件的顺序,我会得到 index.html 但没有 blog.html。
我怎样才能做到这两点?