Skip to content

Conversation

@Myriad-Dreamin
Copy link
Collaborator

@Myriad-Dreamin Myriad-Dreamin commented Jun 5, 2025

Previously, we run renderToHTMLish when transforming the module, this makes it hard to use methods on NodeTypstDocuments. I don't want to do too many things in this PR so I only move compilation into component chunk code and test that we can invoke doc.body() inside of the callback of createComponent.

new feature, a body prop to only render <body/> of html output:

// in [...slug].astro:
---
const Content = render();
---
<Content body={true}>
// in page.astro:
---
import Content from './about.typ?html';
---
<Content body={true}>

@vercel
Copy link

vercel bot commented Jun 5, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
astro-typst ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 11, 2025 9:13am

@Myriad-Dreamin Myriad-Dreamin marked this pull request as ready for review July 11, 2025 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant