mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-29 17:07:08 +02:00
feat(v2): allow specifying of remark and rehype plugins before default plugins (#2689)
* feat(v2): swap order of markdown plugins * feat(v2): remark/rehype plugins can override default plugins
This commit is contained in:
parent
0ff6dd31f4
commit
0e61da8f69
1 changed files with 2 additions and 0 deletions
|
@ -27,10 +27,12 @@ module.exports = async function (fileString) {
|
|||
const options = {
|
||||
...reqOptions,
|
||||
remarkPlugins: [
|
||||
...(reqOptions.beforeDefaultRemarkPlugins || []),
|
||||
...DEFAULT_OPTIONS.remarkPlugins,
|
||||
...(reqOptions.remarkPlugins || []),
|
||||
],
|
||||
rehypePlugins: [
|
||||
...(reqOptions.beforeDefaultRehypePlugins || []),
|
||||
...DEFAULT_OPTIONS.rehypePlugins,
|
||||
...(reqOptions.rehypePlugins || []),
|
||||
],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue