Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

automate page params as much as possible #80

Open
phila82r opened this issue Jul 23, 2020 · 0 comments
Open

automate page params as much as possible #80

phila82r opened this issue Jul 23, 2020 · 0 comments

Comments

@phila82r
Copy link
Contributor

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 folder
  • pageTitle: used to define the title of the page
  • pageTitleIcon: used to define the icon next to the title of the page
  • sideNav: used to show or hide the left side nav
  • sideNavTitle: used to define the title shown on the left side nav if the left side nav is visible
  • sideNavLinkRename: used to rename the side nav link of the current page
  • BookToC: used to show or hide the right side nav (table of content)
  • release: used to display a stable, beta, alpha status tag next to the page title

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant