Skip to content

fix: don't collapse the blog navigation even if collapsible is true#1519

Merged
yangshun merged 2 commits intomasterfrom
blog-nav
May 27, 2019
Merged

fix: don't collapse the blog navigation even if collapsible is true#1519
yangshun merged 2 commits intomasterfrom
blog-nav

Conversation

@yangshun
Copy link
Copy Markdown
Contributor

Motivation

Addresses issue on RN website where collapsible sidebar also appears on the Blog:

I just noticed that this also collapses the sidebar in the blog section. Is it possible to always expand it there?

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

Docs show collapsing but blog doesn't.

Screen Shot 2019-05-26 at 11 07 32 AM
Screen Shot 2019-05-26 at 11 07 29 AM

Related PRs

facebook/react-native-website#934

@docusaurus-bot
Copy link
Copy Markdown
Contributor

docusaurus-bot commented May 26, 2019

Deploy preview for docusaurus-2 ready!

Built with commit 516ac3b

https://deploy-preview-1519--docusaurus-2.netlify.com

@docusaurus-bot
Copy link
Copy Markdown
Contributor

docusaurus-bot commented May 26, 2019

Deploy preview for docusaurus-preview ready!

Built with commit 516ac3b

https://deploy-preview-1519--docusaurus-preview.netlify.com

const SideNav = require('./nav/SideNav.js');
const Metadata = require('../core/metadata.js');

const siteConfig = require(`${process.cwd()}/siteConfig.js`);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/facebook/Docusaurus/blob/8f6b5b8e20f9efa3998378fcc2160d836c5257e2/packages/docusaurus-1.x/lib/core/DocsLayout.js

Can we get the config from passed props ? DocsLayout has config as its props, and we can pass it to DocsSidebar

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm ok sure, edited!

@yangshun yangshun merged commit ef1af0a into master May 27, 2019
@yangshun yangshun deleted the blog-nav branch May 27, 2019 03:38
tusharf5 pushed a commit to tusharf5/Docusaurus that referenced this pull request May 27, 2019
…acebook#1519)

* fix: don't collapse the blog navigation even if collapsible is true

* fix: read docsSideNavCollapsible from props
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Signed Facebook CLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants