Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Custom Processors cleanup and expansion #16838

Merged
merged 11 commits into from Mar 23, 2023
13 changes: 13 additions & 0 deletions docs/src/extend/custom-processors.md
Expand Up @@ -124,3 +124,16 @@ module.exports = {
}
}
```

You can also use the same custom processor with multiple filename extensions. The following example shows using same processor for both `.md` and `.mdx` files:
bpmutter marked this conversation as resolved.
Show resolved Hide resolved

```js
bpmutter marked this conversation as resolved.
Show resolved Hide resolved
module.exports = {
bpmutter marked this conversation as resolved.
Show resolved Hide resolved
// The same custom processor is applied to both
// `.md` and `.mdx` files.
processors: {
".md": myCustomProcessor,
".mdx": myCustomProcessor
}
}
```