Add post written in javascript to demonstrate new js frontmatter capability

This commit is contained in:
Kyle Mathews 2016-12-09 16:15:42 -08:00
parent 066a0cea86
commit e333cb1aad
5 changed files with 393 additions and 289 deletions

View file

@ -17,7 +17,8 @@ class BlogIndex extends React.Component {
access(page, 'data.date')
).reverse()
sortedPages.forEach((page) => {
if (access(page, 'file.ext') === 'md' && !include(page.path, '/404')) {
// Posts are those with md extension that are not 404 pages OR have a date (meaning they're a react component post).
if (access(page, 'file.ext') === 'md' && !include(page.path, '/404') || access(page, 'data.date')) {
const title = access(page, 'data.title') || page.path
pageLinks.push(
<li