+ Define{" "}
+
+ GET
+ ,{" "}
+
+ POST
+ ,{" "}
+
+ DELETE
+ {" "}
+ — any HTTP method as a named handler on your route. Fresh maps
+ requests to the right function automatically, with full type safety.
+
+
+ Learn about handlers
+
+
+
+
+
+
+
+
+
+ );
+}
diff --git a/www/components/homepage/FormsSection.tsx b/www/components/homepage/FormsSection.tsx
index fa6305b3c0a..539338ed651 100644
--- a/www/components/homepage/FormsSection.tsx
+++ b/www/components/homepage/FormsSection.tsx
@@ -8,7 +8,8 @@ import { ExampleArrow } from "../homepage/ExampleArrow.tsx";
import { FancyLink } from "../FancyLink.tsx";
import { FormSubmitDemo } from "../../islands/FormSubmitDemo.tsx";
-const routingCode = `import { define } from "../utils.ts";
+const routingCode = `import { createDefine } from "fresh";
+const define = createDefine();
export const handler = define.handlers({
async POST(ctx) {
diff --git a/www/components/homepage/HeadSection.tsx b/www/components/homepage/HeadSection.tsx
new file mode 100644
index 00000000000..3cd03158520
--- /dev/null
+++ b/www/components/homepage/HeadSection.tsx
@@ -0,0 +1,79 @@
+import { CodeBlock } from "../../components/CodeBlock.tsx";
+import { CodeWindow } from "../../components/CodeWindow.tsx";
+import { PageSection } from "../../components/PageSection.tsx";
+import { SideBySide } from "../../components/SideBySide.tsx";
+import { SectionHeading } from "../../components/homepage/SectionHeading.tsx";
+import { FancyLink } from "../../components/FancyLink.tsx";
+
+const headCode = `import { Head } from "fresh/runtime";
+
+export default function MyPage() {
+ return (
+ <>
+
+ My Page
+
+
+
+
+ Use the{" "}
+ {" "}
+ component from any page or island to set titles, meta tags,
+ stylesheets, and scripts — no hoisting hacks or side channels
+ needed.
+
diff --git a/www/components/homepage/SecuritySection.tsx b/www/components/homepage/SecuritySection.tsx
new file mode 100644
index 00000000000..bd15f675b79
--- /dev/null
+++ b/www/components/homepage/SecuritySection.tsx
@@ -0,0 +1,71 @@
+import { CodeBlock } from "../../components/CodeBlock.tsx";
+import { CodeWindow } from "../../components/CodeWindow.tsx";
+import { PageSection } from "../../components/PageSection.tsx";
+import { SideBySide } from "../../components/SideBySide.tsx";
+import { SectionHeading } from "../../components/homepage/SectionHeading.tsx";
+import { FancyLink } from "../../components/FancyLink.tsx";
+
+const otelCode = `import { App } from "fresh";
+
+const app = new App({
+ // When OpenTelemetry is active, Fresh
+ // auto-injects a
+ // tag — connecting browser traces to
+ // server spans, zero config required
+ otel: true,
+});
+
+app.listen();`;
+
+export function SecuritySection() {
+ return (
+
+
+
+
+ OpenTelemetry, built in
+
+ When OpenTelemetry is active, Fresh automatically injects a{" "}
+
+ traceparent
+ {" "}
+ meta tag into every page — connecting your browser traces to server
+ spans end-to-end, zero config required.
+
+
+ Get full-stack observability across your entire request lifecycle
+ with a single flag.
+
+
+ Learn about OpenTelemetry
+
+
+
+
+
+
+
+
+
+ );
+}
diff --git a/www/components/homepage/Simple.tsx b/www/components/homepage/Simple.tsx
index b161d102a3b..3509d3e09e3 100644
--- a/www/components/homepage/Simple.tsx
+++ b/www/components/homepage/Simple.tsx
@@ -1,26 +1,33 @@
import { PageSection } from "../../components/PageSection.tsx";
+import { CodeBlock } from "../../components/CodeBlock.tsx";
const ONE_FILE_EXAMPLE = `import { App } from "fresh";
const app = new App()
- .get("/", () => new Response("Hello, World!"));
+ .get("/", () =>
+ new Response("Hello!")
+ );
app.listen();`;
const ADD_JSX_EXAMPLE = `import { App } from "fresh";
const app = new App()
- .get("/", (ctx) => ctx.render(
diff --git a/www/components/homepage/TransitionsSection.tsx b/www/components/homepage/TransitionsSection.tsx
new file mode 100644
index 00000000000..f3e8ba03b24
--- /dev/null
+++ b/www/components/homepage/TransitionsSection.tsx
@@ -0,0 +1,81 @@
+import { CodeBlock } from "../../components/CodeBlock.tsx";
+import { CodeWindow } from "../../components/CodeWindow.tsx";
+import { PageSection } from "../../components/PageSection.tsx";
+import { SideBySide } from "../../components/SideBySide.tsx";
+import { SectionHeading } from "../../components/homepage/SectionHeading.tsx";
+import { FancyLink } from "../../components/FancyLink.tsx";
+
+const transitionCode = `import { App } from "fresh";
+
+const app = new App({
+ // Enable the View Transitions API
+ // for smooth client-side navigation
+ viewTransition: true,
+});
+
+app.listen();`;
+
+const cssCode = `/* Style your transitions with CSS */
+::view-transition-old(root) {
+ animation: fade-out 0.2s ease-in;
+}
+::view-transition-new(root) {
+ animation: fade-in 0.2s ease-out;
+}`;
+
+export function TransitionsSection() {
+ return (
+
+
+
+
+ Smooth View Transitions
+
+ Fresh supports the{" "}
+
+ View Transitions API
+ {" "}
+ out of the box, giving your app native-feeling page transitions with
+ a single config flag.
+
+
+ Pages crossfade automatically. Customize animations per-element with
+ plain CSS — no JavaScript animation libraries needed.
+
+
+ Learn about View Transitions
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+}
diff --git a/www/components/homepage/WebSocketSection.tsx b/www/components/homepage/WebSocketSection.tsx
new file mode 100644
index 00000000000..baad1197e91
--- /dev/null
+++ b/www/components/homepage/WebSocketSection.tsx
@@ -0,0 +1,72 @@
+import { CodeBlock } from "../../components/CodeBlock.tsx";
+import { CodeWindow } from "../../components/CodeWindow.tsx";
+import { PageSection } from "../../components/PageSection.tsx";
+import { SideBySide } from "../../components/SideBySide.tsx";
+import { SectionHeading } from "../../components/homepage/SectionHeading.tsx";
+import { FancyLink } from "../../components/FancyLink.tsx";
+
+const wsCode = `import { App } from "fresh";
+
+const app = new App();
+
+app.ws("/chat", {
+ open(socket) {
+ console.log("Client connected");
+ },
+ message(socket, event) {
+ // Echo the message back
+ socket.send(\`You said: \${event.data}\`);
+ },
+ close(socket) {
+ console.log("Client disconnected");
+ },
+});
+
+app.listen();`;
+
+export function WebSocketSection() {
+ return (
+
+
+
+
+ First-class WebSockets
+
+ Add real-time endpoints with{" "}
+
+ app.ws()
+ {" "}
+ — define open, message, and close handlers in a single object. Build
+ chat, live dashboards, or collaborative editing without leaving
+ Fresh.
+