Add post written in javascript to demonstrate new js frontmatter capability
This commit is contained in:
parent
066a0cea86
commit
e333cb1aad
5 changed files with 393 additions and 289 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue