Client functions

useGuiderPage()#

This React hook is the way to hook into Guider internals for the current page.

Example#

function useIsTocEnabled() {
  const guider = useGuiderPage();
  const tocState = guider.settings.tocState;
  return tocState;
}

Reference#

function useGuiderPage(): GuiderPageContext;

returnValueGuiderPageContext

The context for a Guider page, including the page meta data.


siteSiteComponent

The currently active site.

See the useGuider() page for more info.

directoryDirectoryComponent

The currently active directory.

See the useGuider() page for more info.

layoutSiteLayoutComponent

The currently active layout.

See the useGuider() page for more info.

settingsPopulatedLayoutSettings

The fully populated layout settings, all defaults are merged into it (so no optional properties).

Read more about layout settings.

See the useGuider() page for more info.

metaMapMetaMapItem[]

A list of the contents of your _meta.json files.

See the useGuider() page for more info.

navContextobject

The navigational context of the page, use it to get the current links in the sidebar.

See the useGuider() page for more info.

pagePageContext

Data for the current page content.