mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-03 00:39:45 +02:00
chore(v2): make v2 docs plugin legacy (#1639)
* chore(v2): make v2 docs plugin legacy * chore(v2): update fixtures
This commit is contained in:
parent
702dba1c81
commit
e5e085b33d
27 changed files with 24 additions and 21 deletions
|
@ -8,7 +8,7 @@
|
|||
import React from 'react';
|
||||
|
||||
import Head from '@docusaurus/Head';
|
||||
import DocPaginator from '@theme/DocPaginator';
|
||||
import DocLegacyPaginator from '@theme/DocLegacyPaginator';
|
||||
|
||||
import styles from './styles.module.css';
|
||||
|
||||
|
@ -28,7 +28,7 @@ function Headings({headings, isChild}) {
|
|||
);
|
||||
}
|
||||
|
||||
function DocItem(props) {
|
||||
function DocLegacyItem(props) {
|
||||
const {metadata, content: DocContent, docsMetadata} = props;
|
||||
|
||||
return (
|
||||
|
@ -49,7 +49,10 @@ function DocItem(props) {
|
|||
</div>
|
||||
</article>
|
||||
<div className="margin-top--xl margin-bottom--lg">
|
||||
<DocPaginator docsMetadata={docsMetadata} metadata={metadata} />
|
||||
<DocLegacyPaginator
|
||||
docsMetadata={docsMetadata}
|
||||
metadata={metadata}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -66,4 +69,4 @@ function DocItem(props) {
|
|||
);
|
||||
}
|
||||
|
||||
export default DocItem;
|
||||
export default DocLegacyItem;
|
|
@ -10,10 +10,10 @@ import {MDXProvider} from '@mdx-js/react';
|
|||
|
||||
import renderRoutes from '@docusaurus/renderRoutes';
|
||||
import Layout from '@theme/Layout';
|
||||
import DocSidebar from '@theme/DocSidebar';
|
||||
import DocLegacySidebar from '@theme/DocLegacySidebar';
|
||||
import MDXComponents from '@theme/MDXComponents';
|
||||
|
||||
function DocPage(props) {
|
||||
function DocLegacyPage(props) {
|
||||
const {route, docsMetadata, location} = props;
|
||||
const {permalinkToId} = docsMetadata;
|
||||
const id =
|
||||
|
@ -27,7 +27,7 @@ function DocPage(props) {
|
|||
<div className="container container--fluid">
|
||||
<div className="row">
|
||||
<div className="col col--3">
|
||||
<DocSidebar docsMetadata={docsMetadata} sidebar={sidebar} />
|
||||
<DocLegacySidebar docsMetadata={docsMetadata} sidebar={sidebar} />
|
||||
</div>
|
||||
<main className="col">
|
||||
<MDXProvider components={MDXComponents}>
|
||||
|
@ -40,4 +40,4 @@ function DocPage(props) {
|
|||
);
|
||||
}
|
||||
|
||||
export default DocPage;
|
||||
export default DocLegacyPage;
|
|
@ -8,7 +8,7 @@
|
|||
import React from 'react';
|
||||
import Link from '@docusaurus/Link';
|
||||
|
||||
function DocPaginator(props) {
|
||||
function DocLegacyPaginator(props) {
|
||||
const {
|
||||
docsMetadata: {docs},
|
||||
metadata,
|
||||
|
@ -44,4 +44,4 @@ function DocPaginator(props) {
|
|||
);
|
||||
}
|
||||
|
||||
export default DocPaginator;
|
||||
export default DocLegacyPaginator;
|
|
@ -8,13 +8,13 @@
|
|||
import React, {useState} from 'react';
|
||||
import classnames from 'classnames';
|
||||
|
||||
import Link from '@docusaurus/Link'; // eslint-disable-line
|
||||
import Link from '@docusaurus/Link';
|
||||
|
||||
import styles from './styles.module.css';
|
||||
|
||||
const MOBILE_TOGGLE_SIZE = 24;
|
||||
|
||||
function DocSidebar(props) {
|
||||
function DocLegacySidebar(props) {
|
||||
const [showResponsiveSidebar, setShowResponsiveSidebar] = useState(false);
|
||||
const {docsMetadata, sidebar} = props;
|
||||
|
||||
|
@ -127,4 +127,4 @@ function DocSidebar(props) {
|
|||
);
|
||||
}
|
||||
|
||||
export default DocSidebar;
|
||||
export default DocLegacySidebar;
|
Loading…
Add table
Add a link
Reference in a new issue