starting work on abstracting card design
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
---
|
||||
import { JSDOM } from 'jsdom'
|
||||
import Container from './Container.astro'
|
||||
|
||||
const language = Astro.props['data-language'] ?? 'text'
|
||||
|
||||
const html = await Astro.slots.render('default')
|
||||
|
||||
console.log(html)
|
||||
|
||||
const rawCode = new JSDOM(html).window.document.body.textContent
|
||||
---
|
||||
|
||||
<pre {...Astro.props}><slot /></pre>
|
||||
|
||||
{language === 'astro' && <Container set:html={rawCode} />}
|
||||
Reference in New Issue
Block a user