Skip to content

Instantly share code, notes, and snippets.

@DSchau
Created Sep 9, 2017
Embed
What would you like to do?
The GraphQL query showing how to format a date!
export const pageQuery = graphql`
query IndexQuery {
site {
siteMetadata {
title
author
}
}
allMarkdownRemark(sort: { order: DESC, fields: [frontmatter___date] }) {
edges {
node {
excerpt(pruneLength: 250)
id
frontmatter {
date(formatString: "MMMM DD, YYYY")
draft
excerpt
path
tags
title
}
}
}
}
}
`
@donjude-eng
Copy link

donjude-eng commented Jun 6, 2022

Thank you for this!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment