prototype mostly finished
This commit is contained in:
@@ -44,7 +44,7 @@ const { title, description, thumbnail, pageTags } = Astro.props
|
||||
<script>
|
||||
import renderMathInElement from 'katex/contrib/auto-render'
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
const renderMath = () => {
|
||||
renderMathInElement(document.body, {
|
||||
delimiters: [
|
||||
{ left: '$$', right: '$$', display: true },
|
||||
@@ -54,7 +54,12 @@ const { title, description, thumbnail, pageTags } = Astro.props
|
||||
],
|
||||
throwOnError: false,
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => renderMath())
|
||||
|
||||
// @ts-ignore
|
||||
window.renderMath = renderMath
|
||||
</script>
|
||||
|
||||
<script is:inline>
|
||||
|
||||
Reference in New Issue
Block a user