mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-29 14:38:50 +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
|
@ -5,13 +5,14 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/* eslint-disable */
|
||||
import React, {useContext} from 'react';
|
||||
import Head from '@docusaurus/head';
|
||||
|
||||
import React from 'react';
|
||||
import Helmet from 'react-helmet';
|
||||
import DocusaurusContext from '@docusaurus/context';
|
||||
|
||||
function Markdown(props) {
|
||||
const {siteConfig} = props;
|
||||
const context = useContext(DocusaurusContext);
|
||||
const {siteConfig} = context;
|
||||
const highlight = Object.assign(
|
||||
{},
|
||||
{
|
||||
|
@ -30,9 +31,9 @@ function Markdown(props) {
|
|||
|
||||
return (
|
||||
<div>
|
||||
<Helmet>
|
||||
<Head>
|
||||
<link rel="stylesheet" type="text/css" href={highlightThemeURL} />
|
||||
</Helmet>
|
||||
</Head>
|
||||
<div>{props.children}</div>
|
||||
</div>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue