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
Marvin Hagemeister
750ab35499
fix: add back LayoutConfig ( #2982 )
...
~~Makes it easier to upgrade from 1.x .~~
Initially, I assumed it would be just an alias to `RouteConfig`, but
upon closer inspection that has some additional properties that make no
sense for a layout.
2025-05-21 13:44:09 +02:00
Reed von Redwitz
0962a94a11
chore: cleanup unused exported interfaces ( #2535 )
2024-06-23 22:45:14 +02:00
Marvin Hagemeister
287929e4d2
major: import Fresh 2.0 code ( #2449 )
...
🎉
2024-05-24 09:40:08 +02:00
Marvin Hagemeister
fd4a2b99ef
feat: Add types for partial attributes ( #1862 )
2023-10-05 11:02:47 +02:00