mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-23 04:58:03 +02:00
feat: prototype blog & docs generation on dev
This commit is contained in:
parent
187a46d9b6
commit
221023fd51
12 changed files with 181 additions and 37 deletions
|
@ -10,6 +10,7 @@ class MarkdownBlock extends React.Component {
|
|||
const alias = {
|
||||
js: 'jsx'
|
||||
};
|
||||
const {siteConfig} = this.props;
|
||||
const md = new Markdown({
|
||||
langPrefix: 'hljs css language-',
|
||||
highlight(str, lang) {
|
||||
|
@ -99,6 +100,9 @@ class MarkdownBlock extends React.Component {
|
|||
|
||||
render() {
|
||||
const Container = this.props.container;
|
||||
if (!Container) {
|
||||
return <div>{this.content()}</div>;
|
||||
}
|
||||
return <Container>{this.content()}</Container>;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue