2017-02-27 3 views
0

아포스트로피 블로그 모듈을 사용하여 개별 블로그 기사 페이지를 표시하는 데 문제가 있습니다. 나는 뭔가를 놓치고 있거나 뭔가를 잊어 버렸을 것입니다. 아포스트로피 블로그 모듈 : 개별 블로그 게시물 404

  • 샘플 블로그 게시물 "테스트"제목이 로컬 호스트에서 기본 블로그 페이지에 표시됩니다 : URL에 "3000/테스트 로컬 호스트"를 방문 할 때 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 데이터베이스를 검사하여 샘플 테스트 기사가 올바르게 게시되었습니다. 아마도 뷰 파일이 누락 되었습니까? 문서가 거의 없기 때문에 적절한 위치에 뷰 파일을 만들려고했습니다. 자신의 블로그 페이지의 URL를 기준으로 블로그 게시물에 대한

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

  • 답변

    0

    URL입니다 :이 스크린 샷은 현재 파일의 구조를 보여줍니다. 따라서 블로그 페이지가 /blog이고 슬러그가 test 인 테스트 포스트가있는 경우 /blog/test에서 확인할 수 있습니다.

    +0

    그냥 머리가 위로 - ** "apostrophe-blog-widgets"** 대신 ** "apostrophe-blog-pages-widgets"**라는 모듈을 만들고 구성해야한다는 것을 발견했습니다. 그렇지 않으면 콘솔 경고가 표시되었습니다. –

    +0

    감사합니다. 아포스트로피 샌드 박스 프로젝트를 복사하고 내 사이트를 기반으로 블로그를 만들었습니다. –