Integrating Markdown Magic with Remark #1138
-
Markdown Magic is similar to Remark in the sense that it helps automate the process of creating templated markdown files. It has some unique features that I would like to leverage. Does anyone know how I can integrate Markdown Magic, similar tools, or even my own code into a shared NPM package configuration for the I'm basically looking for some hook where I can run Is this something that would be best integrated as a plugin? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Heya @ProfessorManhattan! 👋
To more efficiently handle files in a single pass. |
Beta Was this translation helpful? Give feedback.
Heya @ProfessorManhattan! 👋
markdown-magic
works with text and regular expressions,remark
works on syntax trees and visitor patterns.The two work in fundamentally different ways.
You could wrap both of them in a shell script or alias which runs both on the same file, back to back if you wanted, the only benefit would be saving a few keystrokes in the terminal.
To more efficiently handle files in a single pass.
Consider creating a remark plugin which implements the same feature.
https://unifiedjs.com/learn/ offers some guidance on creating plugins and working with syntax trees.