Skip to content

Commit

Permalink
Refactor schema
Browse files Browse the repository at this point in the history
  • Loading branch information
ogoregen committed Oct 30, 2024
1 parent 3bb2816 commit 8eb6d1d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion data/pages/another-page/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "another page"
slug: "another-page"
description: "Another page"
index: 2
navIndex: 2
---

This is another page.
2 changes: 1 addition & 1 deletion data/pages/page/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "a page"
slug: "a-page"
description: "A page"
index: 1
navIndex: 1
---

This is a page.
2 changes: 1 addition & 1 deletion gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ exports.createSchemaCustomization = ({actions}) => {
slug: String!
description: String!
date: Date @dateformat
index: Int
navIndex: Int
}
`);
};
2 changes: 1 addition & 1 deletion src/components/header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const Header = () => {
query{
allMarkdownRemark(
filter: { fileAbsolutePath: { regex: "/(pages)/" } },
sort: { frontmatter: { index: ASC } }
sort: { frontmatter: { navIndex: ASC } }
){
nodes {
frontmatter {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const query = graphql`

const Blog = ({data}) => {

if(data.allMarkdownRemark.nodes.length == 0){
if(data.allMarkdownRemark.nodes.length === 0){

return(
<Layout>
Expand Down

0 comments on commit 8eb6d1d

Please sign in to comment.