2017-02-27 223 views
0

我无法使用撇号博客模块显示各个博客文章页面。我必须错过什么或忘记了什么?撇号博客模块:个人博客文章404

Here's做复制的问题(在以下回购代码:https://github.com/newdesignideas/sample-veebidisainer)什么

  • 创建了一个示例文章或链接“测试”的博客文章和标题“测试”
  • 样品博客文章“测试”标题在主博客页面在本地主机图所示:
:3000 /博客
  • 样品博客文章访问URL“3000 /测试本地主机”时给出了一个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数据库并且正确发布了示例测试文章。也许我错过了一个视图文件?由于几乎没有文档 - 我曾尝试在适当的地方创建视图文件。该截图显示当前文件的结构:

    Click here to view the sceenshot showing the lib/module file structure

  • 回答

    0

    的博客文章本身相对于博客页面的URL网址。所以如果你有一个博客页面/blog和一个测试帖子test,那么你应该可以在/blog/test看到它。

    +0

    刚刚起来 - 我发现我必须创建和配置一个名为**“撇号 - 博客页面 - 小部件”**而不是**“撇号 - 博客 - 小部件”**的模块 - 否则控制台显示警告。 –

    +0

    谢谢,我复制了撇号沙箱项目,并通过把我的网站建立在博客上。 –