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 = {
|
||||
data: PropTypes.shape({
|
||||
mdx: PropTypes.shape({
|
||||
code: PropTypes.shape({
|
||||
body: PropTypes.string.isRequired,
|
||||
}).isRequired,
|
||||
}),
|
||||
}).isRequired,
|
||||
scope: PropTypes.object.isRequired,
|
||||
pageContext: PropTypes.shape({
|
||||
title: PropTypes.string,
|
||||
|
@ -102,18 +95,11 @@ class Layout extends React.Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
const { data, pageContext, location, children } = this.props
|
||||
const { file, site = {} } = data || {}
|
||||
const mdx = file ? file.childMdx : null
|
||||
const { pageContext, location, children } = this.props
|
||||
const { title, section, sectionTitle, teaser, theme = 'blue', searchExclude } = pageContext
|
||||
const uiTheme = nightly ? 'nightly' : legacy ? 'legacy' : theme
|
||||
const bodyClass = classNames(`theme-${uiTheme}`, { 'search-exclude': !!searchExclude })
|
||||
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 (
|
||||
<>
|
||||
|
@ -146,7 +132,6 @@ class Layout extends React.Component {
|
|||
) : (
|
||||
<div>
|
||||
{children}
|
||||
{content}
|
||||
<Footer wide />
|
||||
</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