Repository navigation
[feature request] Specify per-collection remark/rehype transforms #5
Unanswered
vadimkantorov
asked this question in
Questions
Replies: 1 comment 3 replies
|
You can check the path of the current file from a plugin to decide whether to process it or not as a workaround: function remarkPlugin() {
return function attacher() {
return function transformer(tree, file) {
if (!shouldTransformFile(file)) {
return;
}
// manipulate things
};
};
}The |
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
IIUC the remark/rehype transforms can only be specified globally, but it would be very useful to specify some transforms only for some collections or configure them differently depending on collection
Are there any workarounds for the time being?
All reactions