diff --git a/beta/src/components/Breadcrumbs.tsx b/beta/src/components/Breadcrumbs.tsx index 96b50cd30..ca3afa851 100644 --- a/beta/src/components/Breadcrumbs.tsx +++ b/beta/src/components/Breadcrumbs.tsx @@ -11,7 +11,8 @@ function Breadcrumbs({breadcrumbs}: {breadcrumbs: RouteItem[]}) {
{breadcrumbs.map( (crumb, i) => - crumb.path && ( + crumb.path && + !crumb.skipBreadcrumb && (
diff --git a/beta/src/components/Layout/getRouteMeta.tsx b/beta/src/components/Layout/getRouteMeta.tsx index 83432d5e9..4509337db 100644 --- a/beta/src/components/Layout/getRouteMeta.tsx +++ b/beta/src/components/Layout/getRouteMeta.tsx @@ -35,6 +35,8 @@ export interface RouteItem { hasSectionHeader?: boolean; /** Title of section header */ sectionHeader?: string; + /** Whether it should be omitted in breadcrumbs */ + skipBreadcrumb?: boolean; } export interface Routes { diff --git a/beta/src/content/blog/index.md b/beta/src/content/blog/index.md index 16339d5ff..2508456f8 100644 --- a/beta/src/content/blog/index.md +++ b/beta/src/content/blog/index.md @@ -1,5 +1,5 @@ --- -title: The React Blog +title: Blog --- diff --git a/beta/src/sidebarBlog.json b/beta/src/sidebarBlog.json index e62d5596f..a709a7a8c 100644 --- a/beta/src/sidebarBlog.json +++ b/beta/src/sidebarBlog.json @@ -1,4 +1,6 @@ { + "title": "React Blog", + "path": "/blog", "routes": [ { "hasSectionHeader": true, @@ -7,6 +9,7 @@ { "title": "Blog", "path": "/blog", + "skipBreadcrumb": true, "routes": [ { "title": "React Labs: June 2022", @@ -39,4 +42,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/beta/src/sidebarCommunity.json b/beta/src/sidebarCommunity.json index 4a607b68a..f43e01840 100644 --- a/beta/src/sidebarCommunity.json +++ b/beta/src/sidebarCommunity.json @@ -1,4 +1,6 @@ { + "title": "React Community", + "path": "/community", "routes": [ { "hasSectionHeader": true, @@ -7,6 +9,7 @@ { "title": "Community", "path": "/community", + "skipBreadcrumb": true, "routes": [ { "title": "React Conferences", diff --git a/beta/src/sidebarLearn.json b/beta/src/sidebarLearn.json index edbb3b89e..c2aefd2c1 100644 --- a/beta/src/sidebarLearn.json +++ b/beta/src/sidebarLearn.json @@ -1,203 +1,196 @@ { "title": "Learn React", - "heading": true, "path": "/learn", "routes": [ { - "heading": true, - "path": "", + "hasSectionHeader": true, + "sectionHeader": "Get Started" + }, + { + "title": "Installation", + "path": "/learn/installation", "routes": [ { - "hasSectionHeader": true, - "sectionHeader": "Get Started" + "title": "Start a New React Project", + "path": "/learn/start-a-new-react-project" }, { - "title": "Installation", - "path": "/learn/installation", - "routes": [ - { - "title": "Start a New React Project", - "path": "/learn/start-a-new-react-project" - }, - { - "title": "Add React to a Website", - "path": "/learn/add-react-to-a-website" - }, - { - "title": "Editor Setup", - "path": "/learn/editor-setup" - }, - { - "title": "React Developer Tools", - "path": "/learn/react-developer-tools" - } - ] + "title": "Add React to a Website", + "path": "/learn/add-react-to-a-website" }, { - "title": "Quick Start", - "path": "/learn", - "routes": [ - { - "title": "Tutorial: Tic-Tac-Toe", - "path": "/learn/tutorial-tic-tac-toe" - }, - { - "title": "Thinking in React", - "path": "/learn/thinking-in-react" - } - ] + "title": "Editor Setup", + "path": "/learn/editor-setup" }, { - "hasSectionHeader": true, - "sectionHeader": "Learn React" + "title": "React Developer Tools", + "path": "/learn/react-developer-tools" + } + ] + }, + { + "title": "Quick Start", + "path": "/learn", + "routes": [ + { + "title": "Tutorial: Tic-Tac-Toe", + "path": "/learn/tutorial-tic-tac-toe" }, { - "title": "Describing the UI", - "tags": [], - "path": "/learn/describing-the-ui", - "routes": [ - { - "title": "Your First Component", - "path": "/learn/your-first-component" - }, - { - "title": "Importing and Exporting Components", - "path": "/learn/importing-and-exporting-components" - }, - { - "title": "Writing Markup with JSX", - "path": "/learn/writing-markup-with-jsx" - }, - { - "title": "JavaScript in JSX with Curly Braces", - "path": "/learn/javascript-in-jsx-with-curly-braces" - }, - { - "title": "Passing Props to a Component", - "path": "/learn/passing-props-to-a-component" - }, - { - "title": "Conditional Rendering", - "path": "/learn/conditional-rendering" - }, - { - "title": "Rendering Lists", - "path": "/learn/rendering-lists" - }, - { - "title": "Keeping Components Pure", - "path": "/learn/keeping-components-pure" - } - ] + "title": "Thinking in React", + "path": "/learn/thinking-in-react" + } + ] + }, + { + "hasSectionHeader": true, + "sectionHeader": "Learn React" + }, + { + "title": "Describing the UI", + "tags": [], + "path": "/learn/describing-the-ui", + "routes": [ + { + "title": "Your First Component", + "path": "/learn/your-first-component" }, { - "title": "Adding Interactivity", - "path": "/learn/adding-interactivity", - "tags": [], - "routes": [ - { - "title": "Responding to Events", - "path": "/learn/responding-to-events" - }, - { - "title": "State: A Component's Memory", - "path": "/learn/state-a-components-memory" - }, - { - "title": "Render and Commit", - "path": "/learn/render-and-commit" - }, - { - "title": "State as a Snapshot", - "path": "/learn/state-as-a-snapshot" - }, - { - "title": "Queueing a Series of State Updates", - "path": "/learn/queueing-a-series-of-state-updates" - }, - { - "title": "Updating Objects in State", - "path": "/learn/updating-objects-in-state" - }, - { - "title": "Updating Arrays in State", - "path": "/learn/updating-arrays-in-state" - } - ] + "title": "Importing and Exporting Components", + "path": "/learn/importing-and-exporting-components" }, { - "title": "Managing State", - "path": "/learn/managing-state", - "tags": ["intermediate"], - "routes": [ - { - "title": "Reacting to Input with State", - "path": "/learn/reacting-to-input-with-state" - }, - { - "title": "Choosing the State Structure", - "path": "/learn/choosing-the-state-structure" - }, - { - "title": "Sharing State Between Components", - "path": "/learn/sharing-state-between-components" - }, - { - "title": "Preserving and Resetting State", - "path": "/learn/preserving-and-resetting-state" - }, - { - "title": "Extracting State Logic into a Reducer", - "path": "/learn/extracting-state-logic-into-a-reducer" - }, - { - "title": "Passing Data Deeply with Context", - "path": "/learn/passing-data-deeply-with-context" - }, - { - "title": "Scaling Up with Reducer and Context", - "path": "/learn/scaling-up-with-reducer-and-context" - } - ] + "title": "Writing Markup with JSX", + "path": "/learn/writing-markup-with-jsx" }, { - "title": "Escape Hatches", - "path": "/learn/escape-hatches", - "tags": ["advanced"], - "routes": [ - { - "title": "Referencing Values with Refs", - "path": "/learn/referencing-values-with-refs" - }, - { - "title": "Manipulating the DOM with Refs", - "path": "/learn/manipulating-the-dom-with-refs" - }, - { - "title": "Synchronizing with Effects", - "path": "/learn/synchronizing-with-effects" - }, - { - "title": "You Might Not Need an Effect", - "path": "/learn/you-might-not-need-an-effect" - }, - { - "title": "Lifecycle of Reactive Effects", - "path": "/learn/lifecycle-of-reactive-effects" - }, - { - "title": "Separating Events from Effects", - "path": "/learn/separating-events-from-effects" - }, - { - "title": "Removing Effect Dependencies", - "path": "/learn/removing-effect-dependencies" - }, - { - "title": "Reusing Logic with Custom Hooks", - "path": "/learn/reusing-logic-with-custom-hooks" - } - ] + "title": "JavaScript in JSX with Curly Braces", + "path": "/learn/javascript-in-jsx-with-curly-braces" + }, + { + "title": "Passing Props to a Component", + "path": "/learn/passing-props-to-a-component" + }, + { + "title": "Conditional Rendering", + "path": "/learn/conditional-rendering" + }, + { + "title": "Rendering Lists", + "path": "/learn/rendering-lists" + }, + { + "title": "Keeping Components Pure", + "path": "/learn/keeping-components-pure" + } + ] + }, + { + "title": "Adding Interactivity", + "path": "/learn/adding-interactivity", + "tags": [], + "routes": [ + { + "title": "Responding to Events", + "path": "/learn/responding-to-events" + }, + { + "title": "State: A Component's Memory", + "path": "/learn/state-a-components-memory" + }, + { + "title": "Render and Commit", + "path": "/learn/render-and-commit" + }, + { + "title": "State as a Snapshot", + "path": "/learn/state-as-a-snapshot" + }, + { + "title": "Queueing a Series of State Updates", + "path": "/learn/queueing-a-series-of-state-updates" + }, + { + "title": "Updating Objects in State", + "path": "/learn/updating-objects-in-state" + }, + { + "title": "Updating Arrays in State", + "path": "/learn/updating-arrays-in-state" + } + ] + }, + { + "title": "Managing State", + "path": "/learn/managing-state", + "tags": ["intermediate"], + "routes": [ + { + "title": "Reacting to Input with State", + "path": "/learn/reacting-to-input-with-state" + }, + { + "title": "Choosing the State Structure", + "path": "/learn/choosing-the-state-structure" + }, + { + "title": "Sharing State Between Components", + "path": "/learn/sharing-state-between-components" + }, + { + "title": "Preserving and Resetting State", + "path": "/learn/preserving-and-resetting-state" + }, + { + "title": "Extracting State Logic into a Reducer", + "path": "/learn/extracting-state-logic-into-a-reducer" + }, + { + "title": "Passing Data Deeply with Context", + "path": "/learn/passing-data-deeply-with-context" + }, + { + "title": "Scaling Up with Reducer and Context", + "path": "/learn/scaling-up-with-reducer-and-context" + } + ] + }, + { + "title": "Escape Hatches", + "path": "/learn/escape-hatches", + "tags": ["advanced"], + "routes": [ + { + "title": "Referencing Values with Refs", + "path": "/learn/referencing-values-with-refs" + }, + { + "title": "Manipulating the DOM with Refs", + "path": "/learn/manipulating-the-dom-with-refs" + }, + { + "title": "Synchronizing with Effects", + "path": "/learn/synchronizing-with-effects" + }, + { + "title": "You Might Not Need an Effect", + "path": "/learn/you-might-not-need-an-effect" + }, + { + "title": "Lifecycle of Reactive Effects", + "path": "/learn/lifecycle-of-reactive-effects" + }, + { + "title": "Separating Events from Effects", + "path": "/learn/separating-events-from-effects" + }, + { + "title": "Removing Effect Dependencies", + "path": "/learn/removing-effect-dependencies" + }, + { + "title": "Reusing Logic with Custom Hooks", + "path": "/learn/reusing-logic-with-custom-hooks" } ] } diff --git a/beta/src/sidebarReference.json b/beta/src/sidebarReference.json index 3d5cac5f9..aaab4a26b 100644 --- a/beta/src/sidebarReference.json +++ b/beta/src/sidebarReference.json @@ -1,279 +1,272 @@ { "title": "API Reference", - "heading": true, "path": "/reference/react", "routes": [ { - "heading": true, - "path": "", + "hasSectionHeader": true, + "sectionHeader": "react@18.2.0" + }, + { + "title": "Components", + "path": "/reference/react/components", "routes": [ { - "hasSectionHeader": true, - "sectionHeader": "react@18.2.0" + "title": " (<>)", + "path": "/reference/react/Fragment" }, { - "title": "Components", - "path": "/reference/react/components", - "routes": [ - { - "title": " (<>)", - "path": "/reference/react/Fragment" - }, - { - "title": "", - "path": "/reference/react/Profiler" - }, - { - "title": "", - "path": "/reference/react/StrictMode" - }, - { - "title": "", - "path": "/reference/react/Suspense" - } - ] + "title": "", + "path": "/reference/react/Profiler" }, { - "title": "Hooks", - "path": "/reference/react", - "routes": [ - { - "title": "useCallback", - "path": "/reference/react/useCallback" - }, - { - "title": "useContext", - "path": "/reference/react/useContext" - }, - { - "title": "useDebugValue", - "path": "/reference/react/useDebugValue" - }, - { - "title": "useDeferredValue", - "path": "/reference/react/useDeferredValue" - }, - { - "title": "useEffect", - "path": "/reference/react/useEffect" - }, - { - "title": "useId", - "path": "/reference/react/useId" - }, - { - "title": "useImperativeHandle", - "path": "/reference/react/useImperativeHandle" - }, - { - "title": "useInsertionEffect", - "path": "/reference/react/useInsertionEffect" - }, - { - "title": "useLayoutEffect", - "path": "/reference/react/useLayoutEffect" - }, - { - "title": "useMemo", - "path": "/reference/react/useMemo" - }, - { - "title": "useReducer", - "path": "/reference/react/useReducer" - }, - { - "title": "useRef", - "path": "/reference/react/useRef" - }, - { - "title": "useState", - "path": "/reference/react/useState" - }, - { - "title": "useSyncExternalStore", - "path": "/reference/react/useSyncExternalStore" - }, - { - "title": "useTransition", - "path": "/reference/react/useTransition" - } - ] + "title": "", + "path": "/reference/react/StrictMode" }, { - "title": "APIs", - "path": "/reference/react/apis", - "routes": [ - { - "title": "createContext", - "path": "/reference/react/createContext" - }, - { - "title": "forwardRef", - "path": "/reference/react/forwardRef" - }, - { - "title": "lazy", - "path": "/reference/react/lazy" - }, - { - "title": "memo", - "path": "/reference/react/memo" - }, - { - "title": "startTransition", - "path": "/reference/react/startTransition" - } - ] + "title": "", + "path": "/reference/react/Suspense" + } + ] + }, + { + "title": "Hooks", + "path": "/reference/react", + "routes": [ + { + "title": "useCallback", + "path": "/reference/react/useCallback" }, { - "hasSectionHeader": true, - "sectionHeader": "react-dom@18.2.0" + "title": "useContext", + "path": "/reference/react/useContext" }, { - "title": "Components", - "path": "/reference/react-dom/components", - "routes": [ - { - "title": "Common (e.g.
)", - "path": "/reference/react-dom/components/common" - }, - { - "title": "", - "path": "/reference/react-dom/components/input" - }, - { - "title": "