我无法使用撇号博客模块显示单个博客文章页面。我一定是错过了什么或忘记了什么?
这是复制问题的方法(使用以下仓库中的代码:https ://github.com/newdesignideas/sample-veebidisainer )
- 使用 url “test” 和标题 “test” 创建了一篇示例文章或博客文章
- 示例博客文章“test”标题显示在 localhost:3000/blog 的主博客页面中
- 示例博客文章在访问 url “localhost:3000/test”时出现 404 错误
我的 app.js 如下:
var apos = require('apostrophe')({
shortName: 'veebidisainer',
title: 'veebidisainer',
// declaring the blog bundle
bundles: [ 'apostrophe-blog' ],
// These are the modules we want to bring into the project.
modules: {
// This configures the apostrophe-users module to add an admin-level
// group by default
'apostrophe-users': {
groups: [
{
title: 'guest',
permissions: [ ]
},
{
title: 'admin',
permissions: [ 'admin' ]
}
]
},
// This configures the apostrophe-assets module to push a 'site.less'
// stylesheet by default
'apostrophe-assets': {
stylesheets: [
{
name: 'site'
}
],
scripts: [
{
name: 'mo',
}
]
},
// Add your modules and their respective configuration here!
'apostrophe-blog': {
widget: true
},
'apostrophe-blog-pages': {},
'apostrophe-blog-widgets': {},
'apostrophe-pages': {
// We must list 'apostrophe-blog-pages'
types: [
{ name: 'apostrophe-blog-pages',
label: 'Blog'
},
{
name: 'default',
label: 'Default'
},
{
name: 'home',
label: 'Home'
}
]
},
'b2b-main-menu': {},
'b2b-main-menu-widgets': {
extend: 'apostrophe-pieces-widgets'
},
}
});
我检查了 MongoDB 数据库,示例测试文章已正确发布。也许我错过了一个视图文件?由于几乎没有文档 - 我尝试在适当的地方创建视图文件。此屏幕截图显示了当前的文件结构: