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

forcedNavOrder for dropdown #56

Closed JGeiser9 closed 4 years ago

JGeiser9 commented 4 years ago

First, this is an awesome template for a docs page. Thanks for all of your hard work on this template.

I skimmed through and attempted to edit the config.js file a bit after cloning for an option to force the order of the sub menu items as well. Is there a way to currently do this that I may have missed?

Thanks!

praveenweb commented 4 years ago

Hi @JGeiser9,

The forced ordering of nav items is currently configurable only for the top level items. For sub items, it is assumed that files will be ordered alphabetically. Typically number prefixes like 1, 1.1 etc are used to force the order.

JGeiser9 commented 4 years ago

Thats a fair assumption, I will roll with the prefix format. Thanks for the response

pdesmarets commented 3 years ago

I love the template, thanks for making it available. But renumbering when inserting a new page can be cumbersome and error prone. It would be great to enhance the forcedNavOrder capability to declare the order of nested levels.

pdesmarets commented 3 years ago

Besides, it appears that the Contents right-hand sidebar is lost when naming files start with a number.