Skip to content

Commit

Permalink
Create different internal vs. external sidebars, placeholder internal…
Browse files Browse the repository at this point in the history
… landing page

Summary:
The staticdocs sidebar (i.e. the doc links on the left) was previously generated from directory structure.  I made it explicit here (`sidebars.js`)

Then I split it into an external and internal version using `fbContent`.   external is the same as before.  Added internal categories based on the docathon planning doc.

Also created a placeholder "generated-index" landing page which looks like this:  {F1888851708}

If we point `bunnylol redex` at `https://www.internalfb.com/intern/staticdocs/redex/docs`, it'll land on the above landing page (which can change to whatever we want), and the sidebar will have the internal topics.

The external site will go to the same landing page as before and have the same sidebar content as before.

Differential Revision: D63367528

fbshipit-source-id: c21826bc83efef5c43bf31936320348ea659723d
  • Loading branch information
Jimmy Cleary authored and facebook-github-bot committed Sep 25, 2024
1 parent 278d31f commit 4bba100
Show file tree
Hide file tree
Showing 2 changed files with 155 additions and 12 deletions.
7 changes: 7 additions & 0 deletions website/docs/getting_started/getting_started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
id: getting_started
title: Getting Started
---


Hi, Redex is an Android bytecode optimizer and stuff.
160 changes: 148 additions & 12 deletions website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,154 @@
Create as many sidebars as you want.
*/

const {fbContent} = require('docusaurus-plugin-internaldocs-fb/internal');

module.exports = {
// By default, Docusaurus generates a sidebar from the docs folder structure
tutorialSidebar: [{type: 'autogenerated', dirName: '.'}],

// But you can create a sidebar manually
/*
tutorialSidebar: [
{
type: 'category',
label: 'Tutorial',
items: ['hello'],
},
],
*/
mySidebar: fbContent({
external: [
{
type: 'category',
label: 'Getting Started',
link: { type: 'doc', id: 'getting_started/getting_started' },
items: [
'getting_started/installation',
'getting_started/configuring',
'getting_started/passes',
'getting_started/usage',
]
},
{
type: 'category',
label: 'Examples',
items: [
'examples/proguard',
'examples/synth',
]
},
{
type: 'category',
label: 'Technical Details',
items: [
'technical_details/docker',
'technical_details/interdex',
]
},
{
type: 'category',
label: 'Help',
items: [
'help/faq',
]
}
],
internal: [
{
type: 'category',
label: 'Redex Documentation',
link: {
type: 'generated-index',
title: 'Redex Documentation (Meta-Internal)',
slug: '/',
},
items: [
{
type: 'category',
label: 'Redex Optimizations',
items: [
'getting_started/passes',
]
},
{
type: 'category',
label: 'FAQ',
link: { type: 'doc', id: 'fb/faq/index' },
items: [
]
},
{
type: 'category',
label: 'Android APK Size Topics',
link: { type: 'doc', id: 'fb/apk_size_topics/index' },
items: [
]
},
{
type: 'category',
label: 'Useful Tooling',
link: { type: 'doc', id: 'fb/useful_tooling/index' },
items: [
]
},
{
type: 'category',
label: 'Contributing to Redex',
link: { type: 'doc', id: 'fb/contributing/index' },
items: [
]
},
{
type: 'category',
label: 'Redex Team Internal',
link: { type: 'doc', id: 'fb/redex_team_internal/index' },
items: [
]
},
{
type: 'category',
label: 'Related Teams',
link: { type: 'doc', id: 'fb/related_teams/index' },
items: [
{
type: 'category',
label: 'Pogo',
link: { type: 'doc', id: 'fb/related_teams/pogo/index' },
items: [],
},
]
},
{
type: 'category',
label: 'External Docs',
items: [
{
type: 'category',
label: 'Getting Started',
link: { type: 'doc', id: 'getting_started/getting_started' },
items: [
'getting_started/installation',
'getting_started/configuring',
{ type: 'ref', id: 'getting_started/passes' },
'getting_started/usage',
]
},
{
type: 'category',
label: 'Examples',
items: [
'examples/proguard',
'examples/synth',
]
},
{
type: 'category',
label: 'Technical Details',
items: [
'technical_details/docker',
'technical_details/interdex',
]
},
{
type: 'category',
label: 'Help',
items: [
'help/faq',
]
}
]
}
]
}
]
}),
};

0 comments on commit 4bba100

Please sign in to comment.