通过这种请求,使用插件从Contentful和GraphQLgatsby-source-contentful
中提取帖子数据,寻找访问帖子发布日期 (post.sys.publishedAt) 或 updatedAt 的方法!
{
contentfulPost(id: { eq: 'postId' }) {
--> publishedAt ?
title
image {
responsiveResolution(width: 500, height: 500) {
src
srcSet
height
width
}
}
}