This repository was archived by the owner on Jan 31, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +75
-79
lines changed Expand file tree Collapse file tree 3 files changed +75
-79
lines changed Original file line number Diff line number Diff line change @@ -141,26 +141,26 @@ module.exports = {
141141 } )
142142 } )
143143 } ,
144- query : `
145- {
146- allMarkdownRemark(
147- sort : { order: DESC, fields: [frontmatter___date] }
148- filter: { frontmatter: { templateKey: { eq: "blog-post" } } }
149- ) {
150- edges {
151- node {
152- html
153- fields { slug }
154- frontmatter {
155- title
156- description
157- date
158- }
159- }
160- }
161- }
162- }
163- `,
144+ query : `{
145+ allMarkdownRemark(
146+ sort: {frontmatter: {date: DESC}}
147+ filter : {frontmatter: {templateKey: {eq: "blog-post"}} }
148+ ) {
149+ edges {
150+ node {
151+ html
152+ fields {
153+ slug
154+ }
155+ frontmatter {
156+ title
157+ description
158+ date
159+ }
160+ }
161+ }
162+ }
163+ } `,
164164 output : '/rss.xml' ,
165165 title : 'Blog RSS Feed' ,
166166 } ,
Original file line number Diff line number Diff line change @@ -46,42 +46,40 @@ const BlogIndexPage = ({
4646
4747export default BlogIndexPage
4848
49- export const pageQuery = graphql `
50- query BlogIndexPage {
51- postsAllMarkdownRemark: allMarkdownRemark(
52- sort: { fields: [frontmatter___date], order: DESC }
53- skip: 0
54- limit: 10
55- filter: { frontmatter: { templateKey: { eq: "blog-post" } } }
56- ) {
57- edges {
58- node {
59- frontmatter {
60- title
61- description
62- featuredimage {
63- childImageSharp {
64- gatsbyImageData(
65- height: 350
66- placeholder: BLURRED
67- formats: [AUTO, WEBP, AVIF]
68- layout: CONSTRAINED
69- )
70- }
49+ export const pageQuery = graphql `query BlogIndexPage {
50+ postsAllMarkdownRemark: allMarkdownRemark(
51+ sort: {frontmatter: {date: DESC}}
52+ skip: 0
53+ limit: 10
54+ filter: {frontmatter: {templateKey: {eq: "blog-post"}}}
55+ ) {
56+ edges {
57+ node {
58+ frontmatter {
59+ title
60+ description
61+ featuredimage {
62+ childImageSharp {
63+ gatsbyImageData(
64+ height: 350
65+ placeholder: BLURRED
66+ formats: [AUTO, WEBP, AVIF]
67+ layout: CONSTRAINED
68+ )
7169 }
7270 }
73- fields {
74- slug
75- }
71+ }
72+ fields {
73+ slug
7674 }
7775 }
7876 }
79- site {
80- siteMetadata {
81- siteUrl
82- title
83- description
84- }
77+ }
78+ site {
79+ siteMetadata {
80+ siteUrl
81+ title
82+ description
8583 }
8684 }
87- `
85+ } `
Original file line number Diff line number Diff line change @@ -59,36 +59,34 @@ IndexPage.propTypes = {
5959
6060export default IndexPage
6161
62- export const pageQuery = graphql `
63- query IndexPageTemplate {
64- postsAllMarkdownRemark: allMarkdownRemark(
65- sort: { fields: [frontmatter___date], order: DESC }
66- skip: 0
67- limit: 5
68- filter: { frontmatter: { templateKey: { eq: "blog-post" } } }
69- ) {
70- edges {
71- node {
72- frontmatter {
73- title
74- description
75- featuredimage {
76- childImageSharp {
77- gatsbyImageData(
78- height: 120
79- width: 350
80- placeholder: BLURRED
81- formats: [AUTO, WEBP, AVIF]
82- layout: CONSTRAINED
83- )
84- }
62+ export const pageQuery = graphql `query IndexPageTemplate {
63+ postsAllMarkdownRemark: allMarkdownRemark(
64+ sort: {frontmatter: {date: DESC}}
65+ skip: 0
66+ limit: 5
67+ filter: {frontmatter: {templateKey: {eq: "blog-post"}}}
68+ ) {
69+ edges {
70+ node {
71+ frontmatter {
72+ title
73+ description
74+ featuredimage {
75+ childImageSharp {
76+ gatsbyImageData(
77+ height: 120
78+ width: 350
79+ placeholder: BLURRED
80+ formats: [AUTO, WEBP, AVIF]
81+ layout: CONSTRAINED
82+ )
8583 }
8684 }
87- fields {
88- slug
89- }
85+ }
86+ fields {
87+ slug
9088 }
9189 }
9290 }
9391 }
94- `
92+ } `
You can’t perform that action at this time.
0 commit comments