Astro Repo

Astro Pages

1 min read

Astro Page

Markdown style structure.

---
import {getData} from "@utils/utils.js"
const {title} = Astro.props
---

<h1>{title}</h1>
<p>{1+1}</p>
<div>{getData()}</div>

Code between the code fences --- is run on the “server”.

The HTML code is the rendered or computed code.

Testing Data in Astro

{JSON.stringify(posts)}