diff --git a/src/components/DocHeader.jsx b/src/components/DocHeader.jsx index f62949b8..7b804d9a 100644 --- a/src/components/DocHeader.jsx +++ b/src/components/DocHeader.jsx @@ -1,13 +1,23 @@ import React from 'react' import PropTypes from 'prop-types' +import remark from 'remark' +import remarkReact from 'remark-react' import styles from './DocHeader.module.scss' -const DocHeader = ({ title, description }) => ( -
-

{title}

- {description &&

{description}

} -
-) +const DocHeader = ({ title, description }) => { + const descriptionHtml = + description && + remark() + .use(remarkReact) + .processSync(description).contents + + return ( +
+

{title}

+ {description &&

{descriptionHtml}

} +
+ ) +} DocHeader.propTypes = { title: PropTypes.string.isRequired,