From 6162740212dc57e0eb023c48280682b3bd7bd524 Mon Sep 17 00:00:00 2001 From: Steve Krouse Date: Thu, 9 Nov 2023 16:49:40 -0500 Subject: [PATCH 1/2] Getting Started > Val Town --- .vitepress/config.js | 3 ++- concepts/web-standard.md | 1 + getting-started/val-town.md | 29 +++++++++++++++++++++++++++++ index.md | 2 +- top.md | 1 + 5 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 getting-started/val-town.md diff --git a/.vitepress/config.js b/.vitepress/config.js index c68ada4b..b03b480f 100644 --- a/.vitepress/config.js +++ b/.vitepress/config.js @@ -25,6 +25,7 @@ const sidebars = { { text: 'Bun', link: '/getting-started/bun' }, { text: 'Fastly Compute', link: '/getting-started/fastly' }, { text: 'Lagon', link: '/getting-started/lagon' }, + { text: 'Val Town', link: '/getting-started/val-town' }, { text: 'Vercel', link: '/getting-started/vercel' }, { text: 'Netlify', link: '/getting-started/netlify' }, { text: 'AWS Lambda', link: '/getting-started/aws-lambda' }, @@ -120,7 +121,7 @@ export default defineConfig({ lang: 'en-US', title: 'Hono', description: - 'Ultrafast web framework for Cloudflare Workers, Fastly Compute, Deno, Bun, Vercel, Lagon, Node.js, and others. Fast, but not only fast.', + 'Ultrafast web framework for Cloudflare Workers, Fastly Compute, Deno, Bun, Vercel, Val Town, Lagon, Node.js, and others. Fast, but not only fast.', lastUpdated: true, ignoreDeadLinks: true, cleanUrls: 'with-subfolders', diff --git a/concepts/web-standard.md b/concepts/web-standard.md index 5a41aac0..0f3d610b 100644 --- a/concepts/web-standard.md +++ b/concepts/web-standard.md @@ -26,6 +26,7 @@ In addition, we have a Node.js adapter. Hono runs on these runtimes: - AWS Lambda - Node.js - Vercel (edge-light) +- Val Town It also works on Netlify and other platforms. The same code runs on all platforms. diff --git a/getting-started/val-town.md b/getting-started/val-town.md new file mode 100644 index 00000000..ae5aa329 --- /dev/null +++ b/getting-started/val-town.md @@ -0,0 +1,29 @@ +# Val Town + +Val Town is a social website to write and deploy functions – JavaScript, TypeScript, and JSX – entirely from the browser. + +Val Town APIs are based on the [fetch handler standard](https://blog.val.town/blog/the-api-we-forgot-to-name), so it's extremely well suited for Hono. Hono is one of the [most-used](https://www.val.town/examples/packages/hono) packages on Val Town. + +## 1. Hello World + + + +This val is deployed. View it [here](https://stevekrouse-honoexample.web.val.run/). + +## 2. JSX + +Hono JSX works with this TypeScript pragma + +```ts +/** @jsxImportSource https://esm.sh/hono@3.9.2/jsx **/ +``` + +Live example: + + + +This val is deployed. View it [here](https://stevekrouse-honojsx.web.val.run/). + +## 3. Browse Examples + +Val Town is a community to share ideas and build on each other's inspiration. You can browse [usage of the hono npm package on Val Town](https://www.val.town/examples/packages/hono) or [search for more examples](https://www.val.town/search?q=hono). diff --git a/index.md b/index.md index 77721199..aa9070ed 100644 --- a/index.md +++ b/index.md @@ -6,7 +6,7 @@ head: 'meta', { property: 'og:description', - content: 'Hono is a small, simple, and ultrafast web framework for the Edges. It works on Cloudflare Workers, Fastly Compute, Deno, Bun, Vercel, Netlify, Lagon, AWS Lambda, Lambda@Edge, and Node.js. Fast, but not only fast.', + content: 'Hono is a small, simple, and ultrafast web framework for the Edges. It works on Cloudflare Workers, Fastly Compute, Deno, Bun, Vercel, Val Town, Netlify, Lagon, AWS Lambda, Lambda@Edge, and Node.js. Fast, but not only fast.', }, ] layout: home diff --git a/top.md b/top.md index 6216a031..9f588021 100644 --- a/top.md +++ b/top.md @@ -138,6 +138,7 @@ Thanks to the use of the **Web Standard API**, Hono works on a lot of platforms. - Deno - Bun - Lagon +- Val Town - Vercel - AWS Lambda - Lambda@Edge From e6e12afc41fc7079468e66a76d89079e9559df35 Mon Sep 17 00:00:00 2001 From: Steve Krouse Date: Mon, 13 Nov 2023 12:33:15 -0500 Subject: [PATCH 2/2] fit new browser preview in embeds --- getting-started/val-town.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/getting-started/val-town.md b/getting-started/val-town.md index ae5aa329..df59802e 100644 --- a/getting-started/val-town.md +++ b/getting-started/val-town.md @@ -6,9 +6,7 @@ Val Town APIs are based on the [fetch handler standard](https://blog.val.town/bl ## 1. Hello World - - -This val is deployed. View it [here](https://stevekrouse-honoexample.web.val.run/). + ## 2. JSX @@ -20,9 +18,7 @@ Hono JSX works with this TypeScript pragma Live example: - - -This val is deployed. View it [here](https://stevekrouse-honojsx.web.val.run/). + ## 3. Browse Examples