Add month and day to archive list
This commit is contained in:
@@ -14,7 +14,7 @@ export default function Archive({ data }) {
|
|||||||
const postListItems = yg.edges.map(({node}) => {
|
const postListItems = yg.edges.map(({node}) => {
|
||||||
return (
|
return (
|
||||||
<li>
|
<li>
|
||||||
<a href={node.fields.slug}>{node.frontmatter.title}</a>
|
<a href={node.fields.slug}>{node.frontmatter.date} {node.frontmatter.title}</a>
|
||||||
</li>
|
</li>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@@ -48,6 +48,7 @@ export const query = graphql`
|
|||||||
}
|
}
|
||||||
frontmatter {
|
frontmatter {
|
||||||
title
|
title
|
||||||
|
date(formatString: "MMM Do")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user