私はトラブルアポストロフィブログモジュールを表示するには、個々のブログの記事ページを取得したのです。私は何かを逃しているか何かを忘れていなければなりません(以下のレポでのコードで:https://github.com/newdesignideas/sample-veebidisainer)問題を再現するために何をすべきかアポストロフィブログモジュール:個々のブログ投稿404
Here's
- は、URL「テスト」と、タイトル「テスト」 でサンプル記事やブログ記事を作成しました
- サンプルブログ記事「テスト」のタイトルがローカルホストのメインブログページに示されている:3000 /ブログ
- 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のデータベースをチェックし、サンプルテストの記事が正しく発行されました。おそらく私はビューファイルがないでしょうか?いいえドキュメントにはほとんど存在しないので - 私はどこに適切なビューファイルを作成しようとしています。このスクリーンショットは、現在のファイル構造を示しています
Click here to view the sceenshot showing the lib/module file structure
ジャストヘッドアップ - 私は**「アポストロフィブログ・ページ・ウィジェット」と呼ばれるモジュールを作成および構成する必要がありましたことを発見**ではなく**「アポストロフィブログ・ウィジェット」より** - そうでない場合は、コンソール警告が表示されました。 –
おかげで、私はアポストロフィサンドボックスプロジェクトをコピーして、その上で自分のサイトを基づかことにより、作業のブログを得ました。 –