Commit Graph
51 Commits
Author SHA1 Message Date
Christian Svensson c9b43ea32b feat(docs): add file/language type icons to code blocks (#3162)
I originally wanted to make it clearer the distinction between "files"
and e.g. `` ```tsx foo.tsx `` compared to `` ```sh Terminal `` or ``
```txt Project structure``. I originally started just trying to add a 📝
icon or something. But instead I ended showing file types of all
markdown languages.

I took the file type icons for the SVG's from
https://github.com/vscode-icons/vscode-icons, which has a MIT license.

I think the icons make it a even more clear what the language of the
code snippet is.

I have a follow-up PR for improving code block titles and making
examples more consistent in #3163.


## Comparisons

<details>

<summary><strong>Open &mdash; Before | After</strong></summary>


### TS + Shell icons - Hover tooltips and alt text

<img width="1504" height="639" alt="image"
src="https://github.com/user-attachments/assets/636838a3-f38c-4048-a536-52c1cdd6b6d4"
/>


### TS + Shell icons 2

<img width="1511" height="761" alt="image"
src="https://github.com/user-attachments/assets/2ad6d25c-3995-433a-ad93-162830ca55a1"
/>

### Shell + Dockerfile icons

<img width="1500" height="780" alt="image"
src="https://github.com/user-attachments/assets/88010749-d0d2-4498-9eb2-9bd971e48365"
/>

### Nested blocks + Git icon

<img width="1513" height="634" alt="image"
src="https://github.com/user-attachments/assets/400c27f8-d0b4-40bd-801d-611e1e8a8e36"
/>

</details>
2025-07-31 23:48:00 +02:00
Marvin Hagemeister 3ad3e6ecf3 feat: support lazily loading routes/handlers (#3131)
We can improve cold start times by only loading route modules when the particular pattern matches. This PR introduces the concept of lazy middlewares, routes and handlers to do that.
2025-07-25 14:33:28 +02:00
Marvin Hagemeister a703e79181 docs: update canary docs for Fresh 2 (#3108)
There are still some rough edges here and there, but it's in a much
better shape than what we have today.
2025-07-18 15:18:38 +02:00
Asher Gomez c2b0fe3568 test(www): use @std/expect instead of @std/assert (#3046)
Aligns screenshot tests to the rest of the codebase by using
`@std/expect` instead of `@std/assert`.
2025-06-17 13:50:54 +02:00
zhizhengand李嘉图·M·路 dd1721bce6 chore: refactor sreenshot and add test (#3032)
- Refactor screenshot functionality into testable utility functions
- Add comprehensive test suite to catch regressions early
- Ensure functionality doesn't break unexpectedly without notification

--patch-1
based on review, make throw error naturally

---------

Co-authored-by: 李嘉图·M·路 <146103794+Ricardo-M-Zheng@users.noreply.github.com>
2025-06-13 20:39:10 +02:00
zhizhengand李嘉图·M·路 cb402b9839 fix(utils): restore missing dependencies for screenshot utility (#3016)
The relevant dependencies were lost in previous cleanups. This situation
caused the screenshot function to fail.

This PR properly cleans up the functional function and restores its
operation.

---------

Co-authored-by: 李嘉图·M·路 <146103794+Ricardo-M-Zheng@users.noreply.github.com>
2025-06-11 17:47:57 +02:00
d68b5ecd5b refactor: replace puppeteer with astral for screenshot and close #2919 (#2920)
due to resolves the `NotFound: No such file or directory` error in the
`www/utils/screenshot.ts` script, which was caused by improper file path
construction. This error prevented screenshots from being saved
correctly. close #2919

-- update --patch1
## Current Status
- Using npm:puppeteer for webpage screenshots
- npm lifecycle script warnings present
- deno-puppeteer is no longer maintained
- npm:puppeteer still has compatibility issues

## References
- [astral](https://github.com/lino-levan/astral): Browser automation
library designed for Deno
-
[deno-puppeteer#92](https://github.com/lucacasonato/deno-puppeteer/issues/92):
Recent discussion about deno-puppeteer

## Changes Made
1. Dependency Replacement
   - Replaced npm:puppeteer with jsr:@astral/astral
   - Removed npm lifecycle script warnings

2. Dependency Management Optimization
   - Centralized all imports in deno.json
   - Using jsr: and URL imports

## Testing Steps
1. Run screenshot command:
```bash
deno task screenshot https://google.com google
```

2. Check output:
   - Verify no npm warnings
   - Validate generated image files:
     - ./www/static/showcase/google2x.jpg
     - ./www/static/showcase/google1x.jpg
   - Confirm image quality

3. Run complete test suite:
```bash
deno task ok
```
- Ensure all tests pass

4. Verify functionality:
   - Screenshot feature works correctly
   - Image processing (2x/1x) functions properly

---------

Co-authored-by: 李嘉图·M·路 <146103794+Ricardo-M-Zheng@users.noreply.github.com>
Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
2025-05-12 20:02:15 +02:00
Asher Gomez cea7a2a821 chore: update screenshot task script (#2881) 2025-05-05 08:42:09 +02:00
zhizheng ca6493757e fix: upgrade the puppteer version to enable the screenshot.ts (#2863) (#2866)
the ts is not compatible with Deno 2.0 and cannot generate project
screenshots. #2863

the old verison made by 3 year ago.
2025-04-28 15:11:10 +02:00
Efe 22af15279d www: Fix block quotes not rendering links (#2712)
- Fixes a bug where block quotes were not able to properly render URLs
in docs (e.g. Info section at
https://fresh.deno.dev/docs/getting-started/create-a-route)
- Replaces existing JSX docs url with the suggested, up-to-date docs url

<img width="775" alt="image"
src="https://github.com/user-attachments/assets/e2e83456-697b-47d5-b074-66e4f287f17a">
2024-10-24 11:13:13 +02:00
Mackie Burgess dd555580e1 docs: fix admonition regular expression (#2702)
From #2699, Co-authored by @monooleate

Added `margin-bottom` to better visually align icon with title.
2024-10-10 20:23:08 +02:00
Mackie Burgess 8752dba3cf docs: fix blockquote text not parsed as markdown (#2700)
See issue #2699.

Blockquote text now renders correctly as markdown.

<img width="718" alt="Screenshot 2024-10-10 at 13 42 26"
src="https://github.com/user-attachments/assets/d39dc04e-a408-4f34-a632-881578856896">

<img width="729" alt="Screenshot 2024-10-10 at 13 42 47"
src="https://github.com/user-attachments/assets/e2686cd0-b39c-402d-b460-6f680d5e6d04">
2024-10-10 14:58:46 +02:00
Marvin Hagemeister 1081aa2eb9 fix: docs markdown smartypants (#2671)
This was a regression introduced in
https://github.com/denoland/fresh/pull/2655

Fixes https://github.com/denoland/fresh/issues/2670
2024-10-02 11:43:47 +02:00
Marvin HagemeisterandLuca Casonato de8f1b0c59 feat: update for Deno 2 (#2655)
Co-authored-by: Luca Casonato <hello@lcas.dev>
2024-09-30 18:30:30 +02:00
Marvin Hagemeister a79e797245 chore: remove $std alias (#2548) 2024-06-26 11:21:11 +02:00
Marvin Hagemeister 0f6b4f624f chore: remove debug trace logs (#2545) 2024-06-25 10:08:48 +02: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 f2162d24bf feat: add render function (#2454) 2024-05-24 18:31:34 +02:00
Luca Casonato c9f0ccdce7 feat: rename helpers to define (#2453) 2024-05-24 11:48:32 +02:00
Marvin Hagemeister 287929e4d2 major: import Fresh 2.0 code (#2449)
🎉
2024-05-24 09:40:08 +02:00
Josh CollinsworthandMarvin Hagemeister e8d1a68b58 www: refresh home page (#2418)
Overhauls the Fresh homepage with a new design, new demos, and new
sections highlighting Fresh's capabilities.

---------

Co-authored-by: Marvin Hagemeister <marvin@deno.com>
2024-05-17 16:08:55 +02:00
Reed von Redwitz 82c75f85e9 fix: update dependency recommendations (#2320)
closes https://github.com/denoland/fresh/issues/2319

The issue is because `imports.ts` wasn't changed before releasing. I
thought I would go through and bump some other versions as well. This
handles everything except the esbuild stuff and `tests/`.
2024-02-19 10:33:04 +01:00
Reed von Redwitz ca8338e04d chore: bump std to 0.211.0 and loader to 0.8.3 (#2241) 2024-01-11 15:54:41 +01:00
Marvin Hagemeister de55d80dee docs: improve design (#2097) 2023-11-29 22:50:51 +01:00
Reed von RedwitzandMarvin Hagemeister b902205feb chore: bump std to 208 and deal with deprecations (#2081)
Co-authored-by: Marvin Hagemeister <marvin@deno.com>
2023-11-28 16:35:26 +00:00
Marvin Hagemeister 79fd85ef93 docs: Add migrating to Tailwind CSS page (#2077) 2023-11-28 13:39:05 +01:00
Reed von Redwitz da90d92ebd chore: bump deps (#2000) 2023-11-03 16:52:54 +01:00
Marvin Hagemeister f86a525418 docs: inline gfm-css (#1939) 2023-10-15 08:43:15 +02:00
Marvin Hagemeister cb4dd3299b chore: remove console.log (#1881)
Here is hope that our linter will get a `no-console` rule someday...
2023-10-06 22:57:59 +02:00
Marvin Hagemeister 01e5f71058 docs: improve admonition styles (#1880) 2023-10-06 22:56:11 +02:00
Marvin Hagemeister ced9171690 docs: improve code blocks mobile layout (#1846) 2023-10-04 12:07:31 +02:00
Marvin Hagemeister bc415f6d04 docs: fix anchor links (#1845) 2023-10-04 10:07:09 +02:00
Marvin Hagemeister 477364c567 feat: prebundle code + restore from snapshot (#1604) 2023-08-16 16:47:51 +02:00
Marvin Hagemeister 6a599dbed5 www: new fenced code block design (#1629) 2023-08-13 10:52:41 +02:00
Lino Le Van 292b4c2d6f chore: bump dependencies (#1428) 2023-07-08 22:47:12 +02:00
Lino Le VanandAsher Gomez 736c5524d5 chore: upgrade preact to 10.15.1 and std to 0.190.0 (#1237)
Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
2023-06-03 10:04:23 +10:00
Asher Gomez e0cb693c0f chore(deps): update to std@0.189.0 (#1201) 2023-05-27 17:36:15 +10:00
Lino Le Van 7b036f0af8 chore: bump deps and update copyright year (#1069) 2023-03-21 18:56:30 +09:00
Yoshiya Hinosawa 8daa4849cf fix: revert "chore: bump dependencies and license year (#986)" (#1047) 2023-02-25 18:11:16 +09:00
Lino Le Van ed66986500 chore: bump dependencies and license year (#986) 2023-02-24 15:06:18 +09:00
Aravind 5229dac53c chore: Saved temp png in memory instead of writing to fs - screenshot.ts (#913) 2022-11-25 21:03:17 +09:00
hashrock 0a97129100 resize screenshot and convert to jpeg (#732) 2022-09-09 04:59:23 +09:00
81c1216045 Add Saleor + Fresh example to showcase (#632)
Co-authored-by: Luca Casonato <hello@lcas.dev>
Co-authored-by: hashrock <hashrock@users.noreply.github.com>
2022-09-09 03:12:02 +09:00
Luca Casonato 560f1eec20 docs: add "Concepts: Updating" page 2022-09-08 11:53:38 +02:00
Lino Le Van 28ae07da35 www: bump x/gfm version to aid translation software (#700) 2022-09-06 12:19:39 +00:00
Luca Casonato bbe4277acb chore: update puppeteer (#659) 2022-08-25 15:26:44 +02:00
Benny Yen d798db2a5f www: use frontmatter parser from std (#621) 2022-08-23 13:26:44 +00:00
c7cbd23052 www: new landing page (#602)
* design: add icons to features

* www: update intro layout

* www: add copy button

* www: create CopyArea island

* www: update info style

* www: add showcase

* Update www/routes/index.tsx

Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>

* www: set text-center to feature descriptions

* www: remove showcase image tabindex

add hover feedback to the showcase tiles

* www: add deno install / update links

* www: left align the feature descriptions on small screens

* www: fix broken getting started layout on mobile

* www: always show the copy buttons

* www: add some additional vertical spacing

* improve screenshots

Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>
Co-authored-by: Luca Casonato <hello@lcas.dev>
2022-08-10 14:50:29 +09:00
Luca Casonato 660e0f5fef feat: twind plugin (#513)
This adds a first-party twind plugin to use twind for styling.
2022-08-09 21:41:11 +02:00
Luca Casonato 34fc5514f9 chore: update twind import map defaults in init.ts (#291) 2022-06-27 14:35:34 +02:00