From f1893d5feaabe06067649e9a2b449d275796d9eb Mon Sep 17 00:00:00 2001 From: Joel Marcey Date: Mon, 12 Mar 2018 16:27:37 -0700 Subject: [PATCH] Add secondary, page-specific navigation documentation (#498) And enable for docusaurus.io --- docs/api-site-config.md | 4 ++++ examples/basics/siteConfig.js | 2 ++ website/siteConfig.js | 1 + 3 files changed, 7 insertions(+) diff --git a/docs/api-site-config.md b/docs/api-site-config.md index 8058f95a13..66448bef55 100644 --- a/docs/api-site-config.md +++ b/docs/api-site-config.md @@ -126,6 +126,10 @@ h1 { `ogImage` - url for an Open Graph image. This image will show up when your site is shared on Facebook, Twitter and any other websites/apps where the Open Graph protocol is supported. +`onPageNav` - If you want a visible navigation option for representing topics on the current page. Currently, there is one accepted value for this option: + +- `separate` - The secondary navigation is a separate pane defaulting on the right side of a document. See http://docusaurus.io/docs/en/translation.html for an example. + `organizationName` - GitHub username of the organization or user hosting this project. This is used by the publishing script to determine where your GitHub pages website will be hosted. `scripts` - Array of JavaScript sources to load. The script tag will be inserted in the HTML head. diff --git a/examples/basics/siteConfig.js b/examples/basics/siteConfig.js index eb415cb60c..30483ce63e 100644 --- a/examples/basics/siteConfig.js +++ b/examples/basics/siteConfig.js @@ -62,6 +62,8 @@ const siteConfig = { scripts: ['https://buttons.github.io/buttons.js'], // You may provide arbitrary config keys to be used as needed by your template. repoUrl: 'https://github.com/facebook/test-site', + /* On page navigation for the current documentation page */ + // onPageNav: 'separate', }; module.exports = siteConfig; diff --git a/website/siteConfig.js b/website/siteConfig.js index 56cae26d20..180104cdc7 100644 --- a/website/siteConfig.js +++ b/website/siteConfig.js @@ -163,6 +163,7 @@ const siteConfig = { facebookAppId: '1615782811974223', twitter: 'true', ogImage: 'img/docusaurus.png', + onPageNav: 'separate', }; module.exports = siteConfig;