2017-02-27 112 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

    謝謝,我複製了撇號沙箱項目,並通過把我的網站建立在博客上。 –