Bartek Iwańczuk and Claude Opus 4.6
103427f9da
docs: comprehensive documentation audit, fixes, and website improvements ( #3712 )
...
## Summary
Full documentation audit and fixes for Fresh 2.x docs. Addresses every
issue identified in the [audit
report](https://gist.github.com/bartlomieju/91ddb08c23552f642d2073c0e9a36102 ).
### Critical fixes
- Remove 4 TODO placeholders (app.md, plugins/index.md)
- Fix 4 broken code examples (layouts syntax error, routing missing ctx,
csrf wrong import, getting-started unused prop)
- Fix 3 copy-pasted frontmatter descriptions (context, env-vars, app)
- Fix CSRF page describing CORS instead of CSRF
### New pages (8)
- **Architecture** — request lifecycle diagram, server-first rendering,
islands architecture
- **Data Fetching** — handlers, page(), type-safe data passing, async
components, PageProps reference
- **Signals** — useSignal, computed, props, shared state, serialization
- **Serialization** — supported types, what can't be serialized,
circular refs, pitfalls
- **API Routes** — handler-only routes, method-specific, catch-all,
programmatic
- **Common Patterns** — protected routes, redirects, cookies,
WebSockets, streaming, content negotiation, subdomain routing, proxying,
lazy-loading islands
- **API Reference** — all exports from fresh, fresh/runtime, fresh/dev
- **OpenTelemetry** — what's instrumented, enabling tracing, Deno Deploy
### Expanded pages (6)
- **Routing** — matching priority, HTTP methods, HEAD fallback,
file-based handlers
- **Vite plugin** — HMR, plugin composition, internals, debugging
- **Deno Deploy** — build config, env vars, custom domains,
troubleshooting
- **deno compile** — cross-compilation, limitations
- **Error handling** — expanded HttpError with message param, import
paths
- **Plugins index** — plugin authoring guidance, built-in plugin list
### Structural improvements
- Update all 3 index pages (concepts, advanced, examples) with links to
every sub-page
- Cross-link the two Layouts pages (file-based vs programmatic)
- Resolve contradictory build commands (remove legacy dev.ts references)
- Add "next steps" to Getting Started
- Explain `(_islands)` and `(_components)` directories in file routing
- Document `basePath`, `assetSrcSet()`, `IS_BROWSER`, route `css` option
- Add PR guidelines to Contributing page
- Add Deno version requirements to Introduction
### Docs fixes from issue triage
- **Docker deployment** — add missing `deno install --allow-scripts`
step, remove stale `deno cache`, fix CMD (#3500 )
- **Deployment index** — add install step before build (#3500 )
- **Static files** — add tip about root-relative URLs (#3482 ), add image
optimization section with vite-imagetools, CDN services, best practices
(#671 )
- **main.ts vs main.tsx** — fix examples showing JSX in main.ts, add tip
about serverEntry config (#3476 )
- **Head component** — clarify dedup precedence: last-rendered wins
(#2749 )
- **Islands** — add custom elements / web components section (#2741 )
- **Sharing state** — rewrite cart example to avoid shared module-level
signals (#2437 , #1877 )
- **Common patterns** — add subdomain routing (#603 ), proxying requests
(#361 ), lazy-loading islands (#565 )
### Website fixes
- **Canary redirects** — catch-all `/docs/canary/...` → `/docs/...`
redirect (#3375 )
- **Recipe partials** — redirect direct access to recipe routes to
homepage (#2559 )
- **Homepage** — add progressive complexity code examples to Simple
section (#2755 )
### Image reference fixes
- Rename `getting-started-3-cotuntdown.png` →
`getting-started-3-countdown.png`
- Fix 1.x partials image path
### Grammar/typos
- 11 corrections across 12 files
### CI
- Add `docs/check_images_test.ts` — verifies all markdown image
references resolve to existing files in `www/static/`
Closes #3514
Closes #3476
Closes #3591
Closes #2876
Closes #2075
Closes #1612
Closes #1535
Closes #527
Closes #3059
Closes #3695
Closes #3548
Closes #3500
Closes #3482
Closes #3375
Closes #2749
Closes #2741
Closes #2559
Closes #2437
Closes #671
Closes #361
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-03-29 18:22:33 +00:00
Marvin Hagemeister
79d8cfc3ed
docs: make 2.x the default version ( #3369 )
2025-09-09 14:36:51 +02:00
Marvin Hagemeister
9e58af7a5c
docs: update for vite ( #3308 )
...
Update docs for vite
2025-09-02 10:45:27 +02:00
Marvin Hagemeister
4fe0199c9f
www: port fresh.deno.dev to vite ( #3227 )
...
This PR ports fresh.deno.dev to use our vite plugin.
2025-08-29 16:41:16 +02:00
Marvin Hagemeister
1daca75489
feat: bring back <Head> component ( #3249 )
...
This PR brings back the `<Head>` component from Fresh 1.x . The
implementation is much cleaner than back then and also works client-side
now too.
2025-08-25 15:40:47 +02:00
Marvin Hagemeister
62f8bb008e
docs: update Fresh 2 migration info ( #3161 )
2025-07-31 10:46:44 +02:00
bb23643779
feat: support tailwindcss v4 ( #3054 )
...
update /www and tailwind-plugin to support tailwind v4.
Thanks to the merge of #3034 , the work of integrating and advancing
#2903 is promoted.
related #3034
related #2903
close #3056
close #2819
--patch-1
based on review,
1. del compiler and make it more clean and simple,
2. fix init tailwind part,
3. fix test tailwind part
--patch-2
1. fix the docs
2. fix the docs of plugin and version
--patch-3
1. Addressed various maintenance tasks (chores)
2. Updated the Tailwind CSS plugin to align with this release. Generated
a fresh project using the updated init configuration and
3. deployed it via Deno Deploy EA. Deployment is functioning correctly.
--patch-4
Move postcss imports to Tailwind section in init script
--patch-5
Refactored Tailwind plugin type definitions by copying PluginOptions
properties from @tailwindcss/postcss and adding Fresh-specific exclude
option, while exporting types from package entrypoint for better
accessibility.
Test Project: https://fresh.fresh-press.deno.net/
Test Project Repository:
https://github.com/SisyphusZheng/fresh-tailwindv4
Test Plugin: https://jsr.io/@freshpress/fresh-plugin-tailwind@1.0.0
---------
Co-authored-by: 李嘉图·M·路 <146103794+Ricardo-M-Zheng@users.noreply.github.com >
Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com >
Co-authored-by: Marvin Hagemeister <marvin@deno.com >
2025-07-21 16:13:34 +02:00
Marvin Hagemeister
776a275b5d
docs: design updates ( #3098 )
...
Update colors, spacing and fix the toc animation.
2025-07-16 14:01:30 +02:00
Marvin Hagemeister
c11cf7b41a
feat: expose layouts and pages on App ( #3086 )
...
This PR extracts the functionality from the `fs_routes` plugin and
exposes it onto `App`. These are the new APIs:
- `app.layout(pattern, route)`
- `app.onError(pattern, route)`
- `app.notFound(pattern, route)`
- `app.route(pattern, route)`
This also removes the need for `.use(staticFiles())`. This line can be
safely removed.
Fixes https://github.com/denoland/fresh/issues/3040
Fixes https://github.com/denoland/fresh/issues/3033
Fixes https://github.com/denoland/fresh/issues/2591
Fixes https://github.com/denoland/fresh/issues/950
Fixes https://github.com/denoland/fresh/issues/1918
2025-07-14 19:27:48 +02:00
zhizheng
50d6f7fd09
fix: improve styling of "Edit on GitHub" link for better visibility in Dark mode ( #2994 )
...
change style for dark mode
last:

now:

2025-05-23 14:42:39 +02:00
Marvin Hagemeister
76c77e503e
docs: Make "Edit on GitHub" link more prominent ( #2992 )
...
Folks seem to miss this button
2025-05-22 11:52:52 +02:00
Asher Gomez
144ed2e75c
refactor(core): minor fresh/compat cleanups ( #2880 )
2025-05-19 12:05:22 +02:00
Asher Gomez
20162f6896
chore: use lint tags ( #2952 )
2025-05-15 09:34:46 +02:00
Tim Reichen
0a634bd2d2
chore: fix lint errors ( #2833 )
...
This PR fixes current lint errors thrown by `deno lint`.
2025-03-05 12:31:25 +01:00
David Monaghan and Marvin Hagemeister
b1f2a989a5
www: docs: feat: add dark mode ( #2820 )
...
- Added CSS vars for dark/light colors.
- Added dark/light theme toggle as Island
Fixes #2648
---------
Co-authored-by: Marvin Hagemeister <marvin@deno.com >
2025-02-04 11:58:05 +01:00
Luca Casonato
c3ec742a65
feat: import fresh from fresh ( #2479 )
...
Instead of importing as `@fresh/core`.
2024-06-05 14:51:35 +02:00
Luca Casonato
aa19b393e7
feat: export compat types from /compat export ( #2478 )
2024-06-03 14:32:38 +00:00
Luca Casonato
f2162d24bf
feat: add render function ( #2454 )
2024-05-24 18:31:34 +02:00
Marvin Hagemeister
287929e4d2
major: import Fresh 2.0 code ( #2449 )
...
🎉
2024-05-24 09:40:08 +02:00
Josh Collinsworth
990357629e
Chore: styling and verbiage cleanup ( #2451 )
...
- Better responsive styling of header, logo, nav menu and docs sidebar
- Specify UTC on homepage (since we can't localize server-side)
- Minor copy updates
2024-05-23 12:12:47 -05:00
Marvin Hagemeister
e4981d30ad
www: rework docs layout ( #2429 )
...
- Re-enable partials
- clean up layout a bit
2024-05-21 17:38:32 +02:00
Josh Collinsworth
e126196fe5
Update og image ( #2428 )
2024-05-17 11:19:23 -05:00
Marvin Hagemeister
240252fdb4
Revert "feat: add ctx.redirect() helper ( #2358 )" ( #2372 )
...
Mostly so that it's easier to cut the next patch release for Fresh.
This reverts commit e3508c3054 .
2024-03-21 10:27:53 +01:00
Marvin Hagemeister
e3508c3054
feat: add ctx.redirect() helper ( #2358 )
...
This PR adds a `ctx.redirect(path, status)` helper that aims to reduce
the verbosity of having to manually create a `Response` obejct for a
mere redirect.
```ts
// Before
new Response(null, {
status: 307,
headers: {
Location: "/foo/bar"
},
})
// After
ctx.redirect("/foo/bar", 307)
```
If the second parameter is not passed, it will default to `302`.
2024-03-12 17:36:34 +01:00
Marvin Hagemeister
4a175dc680
docs: disable partial nav temporarily ( #2330 )
...
We can re-enable once https://github.com/preactjs/preact/pull/4287 is
fixed.
Fixes https://github.com/denoland/fresh/issues/2322
2024-02-22 08:28:15 +01:00
Marvin Hagemeister
46eaef0181
docs: fix potential null errors ( #2324 )
2024-02-20 01:19:08 +01:00
Casey Ydenberg and Marvin Hagemeister
25afcae943
docs: Merge data fetching pages ( #1974 ) ( #2107 )
...
Co-authored-by: Marvin Hagemeister <marvin@deno.com >
2023-12-07 10:50:50 +01:00
Marvin Hagemeister
de55d80dee
docs: improve design ( #2097 )
2023-11-29 22:50:51 +01:00
Marvin Hagemeister
dd76addb9f
docs: minor code cleanup ( #2084 )
2023-11-28 18:37:57 +01:00
Marvin Hagemeister
bb035ae8da
docs: port over to TailwindCSS ( #2058 )
2023-11-22 11:12:21 +01:00
Marvin Hagemeister
f86a525418
docs: inline gfm-css ( #1939 )
2023-10-15 08:43:15 +02:00
Birk Skyum and Marvin Hagemeister
eb41b65d4c
docs: Enhanced CSR Layout ( #1908 )
...
Co-authored-by: Marvin Hagemeister <marvin@deno.com >
2023-10-12 12:23:37 +00:00
Marvin Hagemeister
1d12853889
fix: docs header nav not working ( #1904 )
2023-10-11 07:53:30 +02:00
Marvin Hagemeister
534a0d87b3
docs: improve sidebar active style ( #1888 )
2023-10-07 21:05:54 +02:00
Marvin Hagemeister
776a721332
docs: switch to partial navigation ( #1865 )
2023-10-05 12:33:27 +02:00
Marvin Hagemeister
5ba9262f00
fix: docs nav not working ( #1854 )
2023-10-04 15:43:58 +02:00
Marvin Hagemeister
be1c15f8f3
fix: throw error when no partials found ( #1853 )
2023-10-04 15:38:43 +02:00
Marvin Hagemeister
9fdb0d5b01
docs: use builtin active link detection ( #1850 )
2023-10-04 14:34:42 +02:00
Marvin Hagemeister
ced9171690
docs: improve code blocks mobile layout ( #1846 )
2023-10-04 12:07:31 +02:00
Marvin Hagemeister
6a599dbed5
www: new fenced code block design ( #1629 )
2023-08-13 10:52:41 +02:00
Roj
95d352d1dd
www: use smart quotes ( #1502 )
2023-07-22 13:03:03 +02:00
Roj
d1e78095be
www: consistently spell Fresh ( #1504 )
2023-07-22 13:02:31 +02:00
Marvin Hagemeister
f061667822
www: update docs design ( #1423 )
2023-07-10 11:07:49 +02:00
Marvin Hagemeister
bf3e82c093
www: add versioning to docs ( #1400 )
2023-07-04 12:33:47 +02:00
ayame113
45ba10e9ee
chore(www): use View Transitions API ( #1399 )
2023-07-03 12:11:25 +02:00
Marvin Hagemeister
16be99e69b
fix: change MultiHandler back to Handlers ( #1396 )
2023-07-03 09:57:46 +02:00
Aushwin
851f8d60aa
refactor: changed Handlers type to MultiHandler ( #1360 )
2023-06-28 12:52:48 +00:00
ayame113
a724f6c591
www: fix accessibility issues ( #1243 )
...
Address accessibility issues pointed out by Lighthouse.
2023-06-03 22:19:40 +02:00
Luca Casonato and Asher Gomez
87b087e358
fix: __FRSH_BUILD_ID is not defined ( #1207 )
...
This could happen if the runtime/utils.ts coe was loaded
prior to server/constants.ts, because they had some shared state on
`globalThis`.
I have mitigated this by not relying on global state anymore.
Fixes #1191
---------
Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com >
2023-05-30 10:46:44 +10:00
ryu
4a7ecb6168
chore: update tabler_icons_tsx version ( #1159 )
2023-05-12 01:12:18 +09:00