{"action":"created","issue":{"url":"https://api.github.com/repos/MoOx/phenomic/issues/684","repository_url":"https://api.github.com/repos/MoOx/phenomic","labels_url":"https://api.github.com/repos/MoOx/phenomic/issues/684/labels{/name}","comments_url":"https://api.github.com/repos/MoOx/phenomic/issues/684/comments","events_url":"https://api.github.com/repos/MoOx/phenomic/issues/684/events","html_url":"https://github.com/MoOx/phenomic/issues/684","id":173951288,"number":684,"title":"FAQ: Why I am seeing \"No posts yet.\" while I have some .md files already?","user":{"login":"kevin940726","id":7753001,"avatar_url":"https://avatars.githubusercontent.com/u/7753001?v=3","gravatar_id":"","url":"https://api.github.com/users/kevin940726","html_url":"https://github.com/kevin940726","followers_url":"https://api.github.com/users/kevin940726/followers","following_url":"https://api.github.com/users/kevin940726/following{/other_user}","gists_url":"https://api.github.com/users/kevin940726/gists{/gist_id}","starred_url":"https://api.github.com/users/kevin940726/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevin940726/subscriptions","organizations_url":"https://api.github.com/users/kevin940726/orgs","repos_url":"https://api.github.com/users/kevin940726/repos","events_url":"https://api.github.com/users/kevin940726/events{/privacy}","received_events_url":"https://api.github.com/users/kevin940726/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/MoOx/phenomic/labels/type:%20bug","name":"type: bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2016-08-30T07:46:17Z","updated_at":"2016-08-31T05:42:05Z","closed_at":null,"body":"Hi, I really like this project but I cannot get it done by just follow the instruction.\r\n\r\nFirst I tried to add several markdown posts to the app I've created, but it seems to not detecting the posts. It kept showing 'no posts'.\r\n\r\nThen I tried to work on the boilerplate to figure out what went wrong. I followed the instruction on the [contributing](https://phenomic.io/contributing/) page. After running the command and it throw an error below.\r\n\r\n```\r\n> Phenomic@ prestart /Users/Kai/Work/SideProjects/phenomic/boilerplate\r\n> npm -s run showcase-screenshots\r\n\r\nmodule.js:440\r\n    throw err;\r\n    ^\r\n\r\nError: Cannot find module '/Users/Kai/Work/SideProjects/phenomic/boilerplate/scripts/showcase-screenshots.js'\r\n    at Function.Module._resolveFilename (module.js:438:15)\r\n    at Function.Module._load (module.js:386:25)\r\n    at Function.Module.runMain (module.js:575:10)\r\n    at /Users/Kai/Work/SideProjects/phenomic/boilerplate/node_modules/babel-cli/lib/_babel-node.js:151:24\r\n    at Object.<anonymous> (/Users/Kai/Work/SideProjects/phenomic/boilerplate/node_modules/babel-cli/lib/_babel-node.js:152:7)\r\n    at Module._compile (module.js:541:32)\r\n    at Object.Module._extensions..js (module.js:550:10)\r\n    at Module.load (module.js:456:32)\r\n    at tryModuleLoad (module.js:415:12)\r\n    at Function.Module._load (module.js:407:3)\r\n``` \r\n\r\nIt seems to be an issue that the boilerplate package script is just copying the `package.json` from `docs/` folder, which has a `showcase-screenshots` script, but the boilerplate do not have.\r\n\r\nDid I miss something? Any help can be great. Thanks in advance!"},"comment":{"url":"https://api.github.com/repos/MoOx/phenomic/issues/comments/243664070","html_url":"https://github.com/MoOx/phenomic/issues/684#issuecomment-243664070","issue_url":"https://api.github.com/repos/MoOx/phenomic/issues/684","id":243664070,"user":{"login":"MoOx","id":157534,"avatar_url":"https://avatars.githubusercontent.com/u/157534?v=3","gravatar_id":"","url":"https://api.github.com/users/MoOx","html_url":"https://github.com/MoOx","followers_url":"https://api.github.com/users/MoOx/followers","following_url":"https://api.github.com/users/MoOx/following{/other_user}","gists_url":"https://api.github.com/users/MoOx/gists{/gist_id}","starred_url":"https://api.github.com/users/MoOx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MoOx/subscriptions","organizations_url":"https://api.github.com/users/MoOx/orgs","repos_url":"https://api.github.com/users/MoOx/repos","events_url":"https://api.github.com/users/MoOx/events{/privacy}","received_events_url":"https://api.github.com/users/MoOx/received_events","type":"User","site_admin":false},"created_at":"2016-08-31T05:42:05Z","updated_at":"2016-08-31T05:42:05Z","body":"@thangngoc89 This is probably not a bug.\r\n\r\n@kevin940726 If I understand correctly, you created your project using our setup?\r\nI assume that according to the tree that contains the assets/react.svg :)\r\nThe current default boilerplate show you \"No posts yet.\" if the current filtered collection does not return any posts. And, still according to the current default boilerplate, the filters are { layout: \"Post\" }. This means that you should add \"layout: Post\" in your posts/*.md files in the front-matter so the filtered collection will give you those posts.\r\n\r\nSee https://github.com/MoOx/phenomic/blob/13a8353d0c0c73752eca64b1b8c915f8701972c1/boilerplate/web_modules/layouts/Homepage/index.js#L16\r\n\r\nIf you don't want to add \"layout: Post\" in all your post, you can pass a function to `filter` like this\r\n\r\n```js\r\n    filter: (item) => item.__filename.startsWith(\"posts/\")\r\n```\r\n\r\n(You might need to adjust the value used in startsWith() depending on your folder tree).\r\n\r\n---\r\n\r\nThe SW has only been registered because you tried the boilerplate of the repo directly, so if you clean your cache correctly and does not use \"offline\" option in your project, this should not create any problem.\r\n\r\n---\r\n\r\nPlease try to adjust the filters used in the collection call and tell us if that works for you."}}
{"actor":{"display_login":"MoOx"}}