小编Ale*_*sky的帖子

如何在 Astro JS 中将变量从 frontmatter 传递到脚本?

如何在 Astro js 中将变量从 frontmatter 传递到脚本。像这样:

---
const title = "this is title"
---

some content


<script>

const metatile = title

<script>
Run Code Online (Sandbox Code Playgroud)

javascript astro

1
推荐指数
1
解决办法
2286
查看次数

标签 统计

astro ×1

javascript ×1