Accessing markdown transformed by remark plugin
See original GitHub issueHello! Thank you for your work on this library!
I have a custom remark plugin that transforms markdown by modifying local image links. I notice the transformation is propagated to document.body.html
, but does not appear in document.body.raw
. Is it possible to also have a new property available e.g. document.body.markdown
which has the transformed markdown string? Or is there another way to get access to it? Thank you so much!
Issue Analytics
- State:
- Created a year ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Transforming Markdown with Remark & Rehype - ryanfiller.com
Writing custom plugins to give extra powers to Markdown syntax using the Unified ecosystem.
Read more >remark/plugins.md at main - GitHub
remark is a tool that transforms markdown with plugins. See the monorepo readme for info on what the remark ecosystem is. This page...
Read more >Creating a Remark Transformer Plugin - Gatsby
gatsby-transformer-remark empowers developers to translate Markdown into HTML to be consumed via Gatsby's GraphQL API. Blogs and other content based sites ...
Read more >How to build a Remark plugin to supercharge your static site
Remark is a markdown parser built in JavaScript. "Parser" doesn't do Remark justice. Remark is a whole compiler ecosystem built on plugins. It's ......
Read more >remark - markdown processor powered by plugins
remark is a markdown processor powered by plugins part of the unified collective. The project parses and compiles markdown, and lets programs process ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for clarifying your use case @sarimabbas. I’m closing this issue for now. In case someone else has this use case feel free to comment.
I think that makes sense @schickling. I think my initial approach was to separate the build time markdown transformations from the runtime transformations. In other words my contentlayer remark plugins would mess about with the filesystem and modify some image links. Then I hoped to send that transformed markdown to my client which would do other stuff like GFM etc.
But I can just put all my remark plugins at the contentlayer level. Alternatively I can run some rehype plugins in my client. No problem 👍
Thank you for your help!