mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-28 08:27:03 +02:00
[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:
parent
58613545b6
commit
b832176dc6
18 changed files with 231 additions and 2744 deletions
|
@ -342,13 +342,12 @@ function execute() {
|
|||
if (
|
||||
!siteConfig.colors ||
|
||||
!siteConfig.colors.primaryColor ||
|
||||
!siteConfig.colors.secondaryColor ||
|
||||
!siteConfig.colors.prismColor
|
||||
!siteConfig.colors.secondaryColor
|
||||
) {
|
||||
console.error(
|
||||
`${chalk.yellow(
|
||||
"Missing color configuration."
|
||||
)} Make sure siteConfig.colors includes primaryColor, secondaryColor, and prismColor fields.`
|
||||
)} Make sure siteConfig.colors includes primaryColor and secondaryColor fields.`
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -80,8 +80,9 @@ function execute(port) {
|
|||
function reloadSiteConfig() {
|
||||
removeModuleAndChildrenFromCache(CWD + "/siteConfig.js");
|
||||
siteConfig = require(CWD + "/siteConfig.js");
|
||||
if (siteConfig.prism) {
|
||||
siteConfig.prism(require("../core/Prism.js").Prism);
|
||||
|
||||
if (siteConfig.highlight && siteConfig.highlight.hljs) {
|
||||
siteConfig.highlight.hljs(require("highlight.js"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -464,13 +465,12 @@ function execute(port) {
|
|||
if (
|
||||
!siteConfig.colors ||
|
||||
!siteConfig.colors.primaryColor ||
|
||||
!siteConfig.colors.secondaryColor ||
|
||||
!siteConfig.colors.prismColor
|
||||
!siteConfig.colors.secondaryColor
|
||||
) {
|
||||
console.error(
|
||||
`${chalk.yellow(
|
||||
"Missing color configuration."
|
||||
)} Make sure siteConfig.colors includes primaryColor, secondaryColor, and prismColor fields.`
|
||||
)} Make sure siteConfig.colors includes primaryColor and secondaryColor fields.`
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue