mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-20 04:27:04 +02:00
feat(v2): rewrite docs loading strategy (#1092)
* feat(v2): rewrite docs loading strategy * Prettify * Lint * Allow resolving from library root * minor changes, refactor * copyright header
This commit is contained in:
parent
c9243e8922
commit
13a21b2374
36 changed files with 520 additions and 327 deletions
|
@ -12,33 +12,14 @@ import Navbar from '@theme/Navbar'; // eslint-disable-line
|
|||
|
||||
import './styles.css';
|
||||
|
||||
/* eslint-disable react/prefer-stateless-function */
|
||||
export default class Layout extends React.Component {
|
||||
render() {
|
||||
const {
|
||||
children,
|
||||
pagesMetadatas = [],
|
||||
docsMetadatas = {},
|
||||
env,
|
||||
siteConfig,
|
||||
location,
|
||||
metadata,
|
||||
} = this.props;
|
||||
return (
|
||||
<div>
|
||||
<Navbar
|
||||
docsMetadatas={docsMetadatas}
|
||||
env={env}
|
||||
metadata={metadata}
|
||||
siteConfig={siteConfig}
|
||||
/>
|
||||
{children}
|
||||
<Footer
|
||||
docsMetadatas={docsMetadatas}
|
||||
location={location}
|
||||
pagesMetadatas={pagesMetadatas}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
function Layout({children}) {
|
||||
return (
|
||||
<div>
|
||||
<Navbar />
|
||||
{children}
|
||||
<Footer />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Layout;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue