Skip to content
This page is a work in progress and is not linked from the site yet.

Code Comparison

Each section below is one everyday task. The tabs show how each framework does it, written against the starter projects this site tracks on Dev Time. Every titled block is a complete file, so the task is done by writing exactly the files shown into a fresh starter. Your framework choice is remembered across examples and on your next visit.

Add a static page at /about that renders an About heading, and a dynamic page at /posts/1 that reads the id from the URL and renders it.

The starter builds static output, so a dynamic route has to enumerate the pages to build. Adding export const prerender = false switches the route to per-request rendering instead, which then needs an adapter to build and deploy.

src/pages/about.astro
<h1>About</h1>
src/pages/posts/[id].astro
---
export function getStaticPaths() {
return [{ params: { id: '1' } }]
}
const { id } = Astro.params
---
<p>Post {id}</p>

Astro documentation