Is it possible to use unified to generate multiple outputs? #103
Answered
by
wooorm
xiaoxinghu
asked this question in
Q&A
-
Use case: instead of having a 1 to 1 relationship between a markdown file and a The input file: # my first post
...
# my second post
...
# another post
... The processor: unified()
.use(remarkParse)
.use(splitByHeading) // after this point, we have multiple hast to be processed by the following plugins.
.use(remark2rehype)
.use(toc) At the end of the processing, we have an array. |
Beta Was this translation helpful? Give feedback.
Answered by
wooorm
Oct 20, 2020
Replies: 1 comment 1 reply
-
The process deals with one tree and file indeed. But with #104, you’ll end up with a parse/run pipeline for the whole file, and run/stringify pipelines for the separate files. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
xiaoxinghu
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The process deals with one tree and file indeed. But with #104, you’ll end up with a parse/run pipeline for the whole file, and run/stringify pipelines for the separate files.