I am having trouble getting individual blog article pages to show with the apostrophe blog module. I must be missing something or forgetting something?
Here´s what to do to replicate the issue (with the code in the following repo: https://github.com/newdesignideas/sample-veebidisainer)
- created a sample article or blog post with the url "test" and title "test"
- the sample blog post "test" title is shown in the main blog page at localhost:3000/blog
- the sample blog post gives an 404 error when visiting the url "localhost:3000/test"
My app.js is the following:
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'
},
}
});
I checked the MongoDB database and the sample test article was published correctly. Perhaps I am missing a view file? Since there is little to no documentation - I have tried creating the view files wherever appropriate. This screenshot shows the current file structure:
Click here to view the sceenshot showing the lib/module file structure