import { CodeBlock } from "../../components/CodeBlock.tsx"; import { PageSection } from "../../components/PageSection.tsx"; import { SectionHeading } from "../../components/homepage/SectionHeading.tsx"; const features = [ { title: "View Transitions", description: "Native-feeling page transitions with a single config flag. Customize per-element with plain CSS.", href: "/docs/advanced/view-transitions", icon: ( ), code: `const app = new App({ viewTransition: true, });`, lang: "js" as const, }, { title: "Route Handlers", description: "Define GET, POST, DELETE, or any HTTP method as a named handler on your route, with full type safety.", href: "/docs/concepts/routing", icon: ( ), code: `export const handlers = define.handlers({ GET(ctx) { /* ... */ }, POST(ctx) { /* ... */ }, DELETE(ctx) { /* ... */ }, });`, lang: "js" as const, }, { title: "WebSockets", description: "Add real-time endpoints with app.ws(). Define open, message, and close handlers in a single object.", href: "/docs/advanced/websockets", icon: ( ), code: `app.ws("/chat", { open(socket) { /* ... */ }, message(socket, event) { socket.send(event.data); }, });`, lang: "js" as const, }, { title: " Component", description: "Set titles, meta tags, stylesheets, and scripts from any page or island. No hoisting hacks needed.", href: "/docs/advanced/head", icon: ( ), code: ` My Page `, lang: "jsx" as const, }, { title: "OpenTelemetry", description: "Auto-injects a traceparent meta tag into every page, connecting browser traces to server spans.", href: "/docs/advanced/opentelemetry", icon: ( ), code: `const app = new App({ otel: true, });`, lang: "js" as const, }, { title: "Content Security Policy", description: "Automatic nonce injection for inline scripts and styles. Strong security defaults with zero boilerplate.", href: "/docs/plugins/csp", icon: ( ), code: `app.use(csp({ directives: { scriptSrc: ["'nonce'"], }, }));`, lang: "js" as const, }, ]; const extras = [ { title: "File-based routing", description: "Drop a file in routes/, get a URL. Dynamic params via [id].tsx.", href: "/docs/concepts/file-routing", icon: ( ), }, { title: "Middleware", description: "Chain auth, logging, or any logic before your routes run.", href: "/docs/concepts/middleware", icon: ( ), }, { title: "Zero-config TypeScript", description: "Just write .tsx. No tsconfig, no build step, it just works.", href: "/docs/concepts/routing", icon: ( ), }, { title: "Deploy anywhere", description: "Deno Deploy, Docker, Cloudflare Workers, or a single binary with deno compile.", href: "/docs/deployment/deno-deploy", icon: ( ), }, { title: "Layouts", description: "Nested layouts that compose automatically from the file system.", href: "/docs/concepts/layouts", icon: ( ), }, { title: "Built-in plugins", description: "CORS, CSRF, IP filtering, and trailing slashes out of the box.", href: "/docs/plugins/cors", icon: ( ), }, ]; export function MoreFeatures() { return (
And so much more
{features.map((f) => (

{f.title}

{f.icon}

{f.description}

))}

(…and even more)

{extras.map((e) => (

{e.title}

{e.icon}

{e.description}

))}
); }