docs: fix misleading main.tsx filenames (#3477)

Closes #3476

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
fry69
2026-03-29 18:38:14 +00:00
committed by GitHub
co-authored by Bartek Iwańczuk Claude Opus 4.6
parent be467d3cdb
commit 420a8cfb8e
7 changed files with 15 additions and 11 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ mounted alongside other apps. The base path is available in handlers via
All items are applied from top to bottom. This means that when you defined a
middleware _after_ a `.get()` handler, it won't be included.
```ts main.ts
```ts
const app = new App()
.use((ctx) => {
// Will be called for all middlewares
+2
View File
@@ -7,6 +7,8 @@ Routing defines which middlewares and routes should respond to a particular
request.
```ts main.ts
import { App } from "fresh";
const app = new App()
.get("/", () => new Response("hello")) // Responds to: GET /
.get("/other", () => new Response("other")) // Responds to: GET /other
+2 -2
View File
@@ -52,7 +52,7 @@ once in your build output.
By default, Fresh adds caching headers for the `src` and `srcset` attributes on
`<img>` and `<source>` tags.
```tsx main.tsx
```ts
// Caching headers will be automatically added
app.get("/user", (ctx) => ctx.render(<img src="/user.png" />));
```
@@ -60,7 +60,7 @@ app.get("/user", (ctx) => ctx.render(<img src="/user.png" />));
You can always opt out of this behaviour per tag, by adding the
`data-fresh-disable-lock` attribute.
```tsx main.tsx
```ts
// Opt-out of automatic caching headers
app.get(
"/user",