hasura / gatsby-gitbook-starter

Generate GitBook style modern docs/tutorial websites using Gatsby + MDX
https://hasura.io/learn/graphql/react/introduction/
MIT License
985 stars 376 forks source link

How to sort sidebar markdown pages in different order? #103

Open donenoyes opened 3 years ago

donenoyes commented 3 years ago

There was an issue #91 but its closed without providing any solution.

How do we sort pages in the sidebar with different order like date of creation, update, or even ordering as we need flexibly.

Suppose theres a condition that page conclusion.md must be after page hello.md in order. How to handle these situations?

Maddiemcampbell commented 3 years ago

Looking into this as well.

It looks like using frontmatter data might be the best option :https://www.gatsbyjs.com/docs/how-to/routing/adding-markdown-pages/#frontmatter-for-metadata-in-markdown-files

Have you found a solution yet?

Dickson-Mwendia commented 3 years ago

@Maddiemcampbell, any chance you got a solution around this?

lorikrell commented 2 years ago

Has anyone come up with another method of ordering of nested content? Using a number for the url is painful if you have to reorder and redirect. Or at least get a frontmatter slug to work for the link, using the file name strictly for the sidebar order?

AlewsonRyan commented 2 years ago

I too need a method to sort nested content in the nav bar pls. thanks