[markdown] Switch to Remarkable (#153)

* Switch to Remarkable
* Clean up references to custom code blocks
* Remove valdiateDOMNesting warning
* Add syntax highlighting
* Add Reason support
* Breaking change: prismColor to codeColor, remove CompLibrary.Prism, expose hljs
* Completely remove Prism and associated CSS rules
* Support loading plugins and scripts
* Remove CSS rules, allowing Highlight.js theme to be used entirely
* Remove unnecessary webplayer script
This commit is contained in:
Héctor Ramos 2017-10-24 09:45:21 -07:00 committed by Joel Marcey
parent 58613545b6
commit b832176dc6
18 changed files with 231 additions and 2744 deletions

View file

@ -32,6 +32,10 @@ class Site extends React.Component {
(this.props.url || "index.html");
let latestVersion;
const highlightDefaultVersion = '9.12.0';
const highlightConfig = this.props.config.highlight
|| { version: highlightDefaultVersion, theme: 'default' };
const highlightVersion = highlightConfig.version || highlightDefaultVersion;
if (fs.existsSync(CWD + "/versions.json")) {
latestVersion = require(CWD + "/versions.json")[0];
}
@ -124,6 +128,12 @@ class Site extends React.Component {
}}
/>
))}
<script src={`//cdnjs.cloudflare.com/ajax/libs/highlight.js/${highlightVersion}/highlight.min.js`}></script>
<script
dangerouslySetInnerHTML={{
__html: `hljs.initHighlightingOnLoad();`
}}
/>
</body>
</html>
);