Open phila82r opened 4 years ago
Currently, we have 8 page params on most pages that need to be managed manually.
weight
pageTitle
pageTitleIcon
sideNav
sideNavTitle
sideNavLinkRename
BookToC
release
stable
beta
alpha
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.
pageTitleIcon: eth
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
sideNav: false
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
sideNavTitle: dfuse Cloud
Currently, we have 8 page params on most pages that need to be managed manually.
weight
: used to define page rank in a list of pages in the same folderpageTitle
: used to define the title of the pagepageTitleIcon
: used to define the icon next to the title of the pagesideNav
: used to show or hide the left side navsideNavTitle
: used to define the title shown on the left side nav if the left side nav is visiblesideNavLinkRename
: used to rename the side nav link of the current pageBookToC
: used to show or hide the right side nav (table of content)release
: used to display astable
,beta
,alpha
status tag next to the page titleA 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 isethereum
.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/platformsideNavTitle
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