Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: bump docusaurus, use docusaurus/preset-classic (#4960)
* chore: bump docusaurus, use preset-classic * refactor: add important Co-authored-by: Josh Goldberg <me@joshuakgoldberg.com>
- Loading branch information
1 parent
f3a1aba
commit 03577a6
Showing
7 changed files
with
697 additions
and
719 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
if (typeof window !== 'undefined') { | ||
import ExecutionEnvironment from '@docusaurus/ExecutionEnvironment'; | ||
|
||
if (ExecutionEnvironment.canUseDOM) { | ||
require('konamimojisplosion').initializeKonamimojisplosion(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,16 @@ | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
import ExecutionEnvironment from '@docusaurus/ExecutionEnvironment'; | ||
import siteConfig from '@generated/docusaurus.config'; | ||
|
||
const prismIncludeLanguages = PrismObject => { | ||
if (ExecutionEnvironment.canUseDOM) { | ||
const { | ||
themeConfig: { prism = {} }, | ||
} = siteConfig; | ||
const { additionalLanguages = [] } = prism; | ||
window.Prism = PrismObject; | ||
export default function prismIncludeLanguages(PrismObject) { | ||
const { | ||
themeConfig: { prism }, | ||
} = siteConfig; | ||
const { additionalLanguages } = prism; | ||
globalThis.Prism = PrismObject; | ||
|
||
additionalLanguages.forEach(lang => { | ||
require(`prismjs/components/prism-${lang}`); // eslint-disable-line | ||
}); | ||
additionalLanguages.forEach(lang => { | ||
require(`prismjs/components/prism-${lang}`); // eslint-disable-line | ||
}); | ||
|
||
require(`../prism/language/jsonc`); | ||
delete window.Prism; | ||
} | ||
}; | ||
|
||
export default prismIncludeLanguages; | ||
require(`../prism/language/jsonc`); | ||
delete globalThis.Prism; | ||
} |
Oops, something went wrong.