dfuse-io / docs

dfuse documentation
https://docs.dfuse.io
MIT License
27 stars 24 forks source link

automate page params as much as possible #80

Open phila82r opened 4 years ago

phila82r commented 4 years ago

Currently, we have 8 page params on most pages that need to be managed manually.

A bunch of these could be automated (or defaulted) just by looking at the section (url) and returning a default value based on that.

pageTitleIcon could be defined by the url https://docs.dfuse.io/eosio https://docs.dfuse.io/ethereum https://docs.dfuse.io/platform e.g. pageTitleIcon: eth if the root folder in the url is ethereum.

sideNav could be true only if we're not at the root of a section. e.g. sideNav: false if the url is anything else (if we're deeper) than https://docs.dfuse.io/eosio or https://docs.dfuse.io/ethereum or https://docs.dfuse.io/platform

sideNavTitle could use the section's sub-section to define itself. e.g. sideNavTitle: dfuse Cloud if the url is https://docs.dfuse.io/platform/dfuse-cloud or https://docs.dfuse.io/platform/dfuse-cloud/xxxx