Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add secondary fields to www query sorts #10085

Merged
merged 1 commit into from
Nov 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion www/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ exports.createPages = ({ graphql, actions }) => {
graphql(`
query {
allMarkdownRemark(
sort: { order: DESC, fields: [frontmatter___date] }
sort: { order: DESC, fields: [frontmatter___date, fields___slug] }
limit: 10000
filter: { fileAbsolutePath: { ne: null } }
) {
Expand Down
3 changes: 2 additions & 1 deletion www/src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ export const pageQuery = graphql`
}
}
allMarkdownRemark(
sort: { order: DESC, fields: [frontmatter___date] }
sort: { order: DESC, fields: [frontmatter___date, fields___slug] }
limit: 3
filter: {
frontmatter: { draft: { ne: true } }
Expand All @@ -319,6 +319,7 @@ export const pageQuery = graphql`
filter: {
fields: { starterShowcase: { slug: { in: $featuredStarters } } }
}
sort: { fields: [fields___starterShowcase___slug] }
pieh marked this conversation as resolved.
Show resolved Hide resolved
) {
edges {
node {
Expand Down
2 changes: 1 addition & 1 deletion www/src/templates/tags.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const pageQuery = graphql`
query($tag: String) {
allMarkdownRemark(
limit: 2000
sort: { fields: [frontmatter___date], order: DESC }
sort: { fields: [frontmatter___date, fields___slug], order: DESC }
filter: {
frontmatter: { tags: { in: [$tag] } }
fileAbsolutePath: { regex: "/docs.blog/" }
Expand Down
2 changes: 1 addition & 1 deletion www/src/templates/template-blog-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export default BlogPostsIndex
export const pageQuery = graphql`
query blogListQuery($skip: Int!, $limit: Int!) {
allMarkdownRemark(
sort: { order: DESC, fields: [frontmatter___date] }
sort: { order: DESC, fields: [frontmatter___date, fields___slug] }
filter: {
frontmatter: { draft: { ne: true } }
fileAbsolutePath: { regex: "/docs.blog/" }
Expand Down
2 changes: 1 addition & 1 deletion www/src/templates/template-contributor-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export const pageQuery = graphql`
}
}
allMarkdownRemark(
sort: { order: DESC, fields: [frontmatter___date] }
sort: { order: DESC, fields: [frontmatter___date, fields___slug] }
filter: {
fileAbsolutePath: { regex: "/blog/" }
frontmatter: { draft: { ne: true } }
Expand Down