Repository navigation
Getting Markdown entry's fully faithful HTML (as in <Content />)
#10
Unanswered
vadimkantorov
asked this question in
Questions
Replies: 1 comment 1 reply
|
It’s a bit annoying because it requires an extra component layer, but you can do this: ---
// ProcessHTML.astro
const html = await Astro.slots.render('default');
const processedHTML = processWithRehypeOrWhatever(html);
---
<Fragment set:html={processedHTML} />---
// ...
const Markdown = await render(entry)
---
<ProcessHTML>
<Markdown.Content />
</ProcessHTML> |
1 reply
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.
Uh oh!
There was an error while loading. Please reload this page.
I was using:
but if I need to get html for some custom rehype post-processing, how to do this?
Using

entry.rendered.htmlkeeps Markdown images under-processed (and thus breaks them):All reactions