mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-07 13:44:55 +03:00
Remove outdated MDX handling
This commit is contained in:
parent
e3d5169a01
commit
d1ab5ddb5b
|
@ -69,13 +69,6 @@ class Layout extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
data: PropTypes.shape({
|
|
||||||
mdx: PropTypes.shape({
|
|
||||||
code: PropTypes.shape({
|
|
||||||
body: PropTypes.string.isRequired,
|
|
||||||
}).isRequired,
|
|
||||||
}),
|
|
||||||
}).isRequired,
|
|
||||||
scope: PropTypes.object.isRequired,
|
scope: PropTypes.object.isRequired,
|
||||||
pageContext: PropTypes.shape({
|
pageContext: PropTypes.shape({
|
||||||
title: PropTypes.string,
|
title: PropTypes.string,
|
||||||
|
@ -102,18 +95,11 @@ class Layout extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { data, pageContext, location, children } = this.props
|
const { pageContext, location, children } = this.props
|
||||||
const { file, site = {} } = data || {}
|
|
||||||
const mdx = file ? file.childMdx : null
|
|
||||||
const { title, section, sectionTitle, teaser, theme = 'blue', searchExclude } = pageContext
|
const { title, section, sectionTitle, teaser, theme = 'blue', searchExclude } = pageContext
|
||||||
const uiTheme = nightly ? 'nightly' : legacy ? 'legacy' : theme
|
const uiTheme = nightly ? 'nightly' : legacy ? 'legacy' : theme
|
||||||
const bodyClass = classNames(`theme-${uiTheme}`, { 'search-exclude': !!searchExclude })
|
const bodyClass = classNames(`theme-${uiTheme}`, { 'search-exclude': !!searchExclude })
|
||||||
const isDocs = ['usage', 'models', 'api', 'styleguide'].includes(section)
|
const isDocs = ['usage', 'models', 'api', 'styleguide'].includes(section)
|
||||||
const content = !mdx ? null : (
|
|
||||||
<MDXProvider components={remarkComponents}>
|
|
||||||
<MDXRenderer scope={this.state.scope}>{mdx.code.body}</MDXRenderer>
|
|
||||||
</MDXProvider>
|
|
||||||
)
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
@ -146,7 +132,6 @@ class Layout extends React.Component {
|
||||||
) : (
|
) : (
|
||||||
<div>
|
<div>
|
||||||
{children}
|
{children}
|
||||||
{content}
|
|
||||||
<Footer wide />
|
<Footer wide />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
@ -155,4 +140,4 @@ class Layout extends React.Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default withMDXScope(Layout)
|
export default Layout
|
||||||
|
|
Loading…
Reference in New Issue
Block a user