{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/Docusaurus/issues/868","repository_url":"https://api.github.com/repos/facebook/Docusaurus","labels_url":"https://api.github.com/repos/facebook/Docusaurus/issues/868/labels{/name}","comments_url":"https://api.github.com/repos/facebook/Docusaurus/issues/868/comments","events_url":"https://api.github.com/repos/facebook/Docusaurus/issues/868/events","html_url":"https://github.com/facebook/Docusaurus/issues/868","id":343715573,"node_id":"MDU6SXNzdWUzNDM3MTU1NzM=","number":868,"title":"Allow using one doc id in multiple sidebars","user":{"login":"SleepWalker","id":2536916,"node_id":"MDQ6VXNlcjI1MzY5MTY=","avatar_url":"https://avatars2.githubusercontent.com/u/2536916?v=4","gravatar_id":"","url":"https://api.github.com/users/SleepWalker","html_url":"https://github.com/SleepWalker","followers_url":"https://api.github.com/users/SleepWalker/followers","following_url":"https://api.github.com/users/SleepWalker/following{/other_user}","gists_url":"https://api.github.com/users/SleepWalker/gists{/gist_id}","starred_url":"https://api.github.com/users/SleepWalker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SleepWalker/subscriptions","organizations_url":"https://api.github.com/users/SleepWalker/orgs","repos_url":"https://api.github.com/users/SleepWalker/repos","events_url":"https://api.github.com/users/SleepWalker/events{/privacy}","received_events_url":"https://api.github.com/users/SleepWalker/received_events","type":"User","site_admin":false},"labels":[{"id":630651495,"node_id":"MDU6TGFiZWw2MzA2NTE0OTU=","url":"https://api.github.com/repos/facebook/Docusaurus/labels/feature%20request","name":"feature request","color":"84b6eb","default":false},{"id":851984712,"node_id":"MDU6TGFiZWw4NTE5ODQ3MTI=","url":"https://api.github.com/repos/facebook/Docusaurus/labels/issue:%20claimed","name":"issue: claimed","color":"ce1a77","default":false}],"state":"open","locked":false,"assignee":{"login":"SleepWalker","id":2536916,"node_id":"MDQ6VXNlcjI1MzY5MTY=","avatar_url":"https://avatars2.githubusercontent.com/u/2536916?v=4","gravatar_id":"","url":"https://api.github.com/users/SleepWalker","html_url":"https://github.com/SleepWalker","followers_url":"https://api.github.com/users/SleepWalker/followers","following_url":"https://api.github.com/users/SleepWalker/following{/other_user}","gists_url":"https://api.github.com/users/SleepWalker/gists{/gist_id}","starred_url":"https://api.github.com/users/SleepWalker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SleepWalker/subscriptions","organizations_url":"https://api.github.com/users/SleepWalker/orgs","repos_url":"https://api.github.com/users/SleepWalker/repos","events_url":"https://api.github.com/users/SleepWalker/events{/privacy}","received_events_url":"https://api.github.com/users/SleepWalker/received_events","type":"User","site_admin":false},"assignees":[{"login":"SleepWalker","id":2536916,"node_id":"MDQ6VXNlcjI1MzY5MTY=","avatar_url":"https://avatars2.githubusercontent.com/u/2536916?v=4","gravatar_id":"","url":"https://api.github.com/users/SleepWalker","html_url":"https://github.com/SleepWalker","followers_url":"https://api.github.com/users/SleepWalker/followers","following_url":"https://api.github.com/users/SleepWalker/following{/other_user}","gists_url":"https://api.github.com/users/SleepWalker/gists{/gist_id}","starred_url":"https://api.github.com/users/SleepWalker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SleepWalker/subscriptions","organizations_url":"https://api.github.com/users/SleepWalker/orgs","repos_url":"https://api.github.com/users/SleepWalker/repos","events_url":"https://api.github.com/users/SleepWalker/events{/privacy}","received_events_url":"https://api.github.com/users/SleepWalker/received_events","type":"User","site_admin":false}],"milestone":null,"comments":11,"created_at":"2018-07-23T16:58:52Z","updated_at":"2018-08-21T05:11:54Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"## 🚀 Feature\r\n\r\nAllow the same document to be specified in multiple sidebars.\r\n\r\n## Have you read the [Contributing Guidelines on issues](https://github.com/facebook/Docusaurus/blob/master/CONTRIBUTING.md#reporting-new-issues)?\r\n\r\nYes\r\n\r\n## Motivation\r\n\r\nImprove navigation across the docs\r\n\r\nCurrently we have a limitation. A document can be child of only one sidebar, which has a bad impact on navigation in case, when you have one sidebar containing \"high level\" TOC and multiple sidebars with some docs regarding \"low level\" details for corresponding high level doc.\r\n\r\nFor example you have the following sidebar.json:\r\n\r\n```json\r\n{\r\n  \"docs\": {\r\n    \"Guides\": [\r\n      \"adding-blog\",\r\n      \"custom-pages\",\r\n      \"search\",\r\n      \"navigation\",\r\n      \"translation\",\r\n      \"versioning\"\r\n    ]\r\n  },\r\n  \"blog\": {\r\n    \"General\": [\r\n      \"adding-comments\",\r\n      \"setup-author\",\r\n      \"post-sharing\",\r\n      \"blog-rss\"\r\n    ]\r\n  }\r\n}\r\n```\r\n\r\nTo make the main sidebar shorter, we splitting more specific docs into a separate section with it's own sidebar. In this example document `adding-blog` links to more specific docs, like `adding-comments`. It would be great to have a link to `adding-blog` in \"blog\" sidebar to let the user return back to the \"docs\" sidebar and high-level article.\r\n\r\n## Pitch\r\n\r\nThe reason why we can not have one document in multiple sidebars (as far as I know) is because we need a way to decide which sidebar to show for document, that is in multiple sidebars.\r\n\r\nTo solve this problem I propose to use dot notation. E.g.:\r\n\r\n```json\r\n{\r\n  \"docs\": {\r\n    \"Guides\": [\r\n      \"adding-blog\",\r\n      \"...\"\r\n    ]\r\n  },\r\n  \"blog\": {\r\n    \"General\": [\r\n      \"docs.adding-blog\",\r\n      \"adding-comments\",\r\n      \"...\"\r\n    ]\r\n  }\r\n}\r\n```\r\n\r\nThis way we will know, that `adding-blog` should have \"docs\" sidebar, but at the same time \"blog\" sidebar will link to `adding-blog` too.\r\n\r\nAlternatively we can use some prefix e.g. `link:`, to show, that this sidebar only links to that doc. This prefix can be extended to allow absolute links too, e.g. `link:/storybook` or `link:https://external-docs.com`.\r\n\r\nAnd the most universal variant is to use objects instead of strings to allow for more precise and flexible configuration."},"comment":{"url":"https://api.github.com/repos/facebook/Docusaurus/issues/comments/414551847","html_url":"https://github.com/facebook/Docusaurus/issues/868#issuecomment-414551847","issue_url":"https://api.github.com/repos/facebook/Docusaurus/issues/868","id":414551847,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNDU1MTg0Nw==","user":{"login":"endiliey","id":17883920,"node_id":"MDQ6VXNlcjE3ODgzOTIw","avatar_url":"https://avatars3.githubusercontent.com/u/17883920?v=4","gravatar_id":"","url":"https://api.github.com/users/endiliey","html_url":"https://github.com/endiliey","followers_url":"https://api.github.com/users/endiliey/followers","following_url":"https://api.github.com/users/endiliey/following{/other_user}","gists_url":"https://api.github.com/users/endiliey/gists{/gist_id}","starred_url":"https://api.github.com/users/endiliey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endiliey/subscriptions","organizations_url":"https://api.github.com/users/endiliey/orgs","repos_url":"https://api.github.com/users/endiliey/repos","events_url":"https://api.github.com/users/endiliey/events{/privacy}","received_events_url":"https://api.github.com/users/endiliey/received_events","type":"User","site_admin":false},"created_at":"2018-08-21T05:11:54Z","updated_at":"2018-08-21T05:11:54Z","author_association":"COLLABORATOR","body":"Cc @joelmarcey @yangshun"}}
{"actor":{"display_login":"endiliey"}}