Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Contributing Guidelines

For the full contributing guide, see the
[Fresh documentation](https://fresh.deno.dev/docs/latest/contributing).
[Fresh documentation](https://usefresh.dev/docs/latest/contributing).

## PR title format

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
- name: Check docs
run: deno task check:docs

- name: Build fresh.deno.dev
- name: Build usefresh.dev
if: startsWith(matrix.os, 'ubuntu') && matrix.deno == 'v2.x'
run: deno task build-www

Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ with workspace members in `packages/*` and `www/`.

### Other directories

- **`www/`**: Documentation website (fresh.deno.dev), built with Fresh + Vite +
- **`www/`**: Documentation website (usefresh.dev), built with Fresh + Vite +
Tailwind. Has its own routes, islands, and vite.config.ts.
- **`docs/`**: Markdown documentation organized by version (`latest/`, `1.x/`,
`canary/`).
Expand Down
25 changes: 12 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# fresh

<img align="right" src="https://fresh.deno.dev/logo.svg" height="150px" alt="The Fresh logo: a sliced lemon dripping with juice">
<img align="right" src="https://usefresh.dev/logo.svg" height="150px" alt="The Fresh logo: a sliced lemon dripping with juice">

**Fresh** is a next generation web framework, built for speed, reliability, and
simplicity.
Expand All @@ -18,8 +18,8 @@ Some stand-out features:

## 📖 Documentation

The [documentation](https://fresh.deno.dev/docs/introduction) is available on
[fresh.deno.dev](https://fresh.deno.dev/).
The [documentation](https://usefresh.dev/docs/introduction) is available on
[usefresh.dev](https://usefresh.dev/).

## 🚀 Getting started

Expand Down Expand Up @@ -58,7 +58,7 @@ To deploy the project to the live internet, you can use
subdomain with no configuration necessary.

For a more in-depth getting started guide, visit the
[Getting Started](https://fresh.deno.dev/docs/getting-started) page in the Fresh
[Getting Started](https://usefresh.dev/docs/getting-started) page in the Fresh
docs.

## Contributing
Expand All @@ -69,9 +69,8 @@ We appreciate your help! To contribute, please read our
## Adding your project to the showcase

If you feel that your project would be helpful to other Fresh users, please
consider putting your project on the
[showcase](https://fresh.deno.dev/showcase). However, websites that are just for
promotional purposes may not be listed.
consider putting your project on the [showcase](https://usefresh.dev/showcase).
However, websites that are just for promotional purposes may not be listed.

To take a screenshot, run the following command.

Expand All @@ -88,15 +87,15 @@ preferably with source code on GitHub, but not required.
![Made with Fresh](./www/static/fresh-badge.svg)

```md
[![Made with Fresh](https://fresh.deno.dev/fresh-badge.svg)](https://fresh.deno.dev)
[![Made with Fresh](https://usefresh.dev/fresh-badge.svg)](https://usefresh.dev)
```

```html
<a href="https://fresh.deno.dev">
<a href="https://usefresh.dev">
<img
width="197"
height="37"
src="https://fresh.deno.dev/fresh-badge.svg"
src="https://usefresh.dev/fresh-badge.svg"
alt="Made with Fresh"
/>
</a>
Expand All @@ -105,15 +104,15 @@ preferably with source code on GitHub, but not required.
![Made with Fresh(dark)](./www/static/fresh-badge-dark.svg)

```md
[![Made with Fresh](https://fresh.deno.dev/fresh-badge-dark.svg)](https://fresh.deno.dev)
[![Made with Fresh](https://usefresh.dev/fresh-badge-dark.svg)](https://usefresh.dev)
```

```html
<a href="https://fresh.deno.dev">
<a href="https://usefresh.dev">
<img
width="197"
height="37"
src="https://fresh.deno.dev/fresh-badge-dark.svg"
src="https://usefresh.dev/fresh-badge-dark.svg"
alt="Made with Fresh"
/>
</a>
Expand Down
2 changes: 1 addition & 1 deletion docs/1.x/concepts/middleware.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ for a `route`, as opposed to something like `http://localhost:8001/favicon.ico`.

### Example

Initiate a new Fresh project (`deno run -A -r https://fresh.deno.dev/`) and then
Initiate a new Fresh project (`deno run -A -r https://usefresh.dev/`) and then
create a `_middleware.ts` file in the `routes` folder like this:

```ts routes/_middleware.ts
Expand Down
2 changes: 1 addition & 1 deletion docs/1.x/concepts/updating.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ To run the auto updater, run the following command from the root of your
project:

```sh Terminal
$ deno run -A -r https://fresh.deno.dev/update
$ deno run -A -r https://usefresh.dev/update
```

You will be prompted to confirm the changes that will be made to your project.
Expand Down
4 changes: 2 additions & 2 deletions docs/1.x/examples/authentication-with-supabase.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The purpose of the example app we're building here is to showcase the basic
building blocks of an implementation. As such, it is limited in functionality
and purposefully leaves out things like
[password resets](https://supabase.com/docs/guides/auth/server-side/email-based-auth-with-pkce-flow-for-ssr),
[proper error handling](https://fresh.deno.dev/docs/1.x/concepts/error-pages) as
[proper error handling](https://usefresh.dev/docs/1.x/concepts/error-pages) as
well as validating input form data. You can find the
[full code here](https://github.com/morlinbrot/supa-fresh-pkce), where the
missing functionality is implemented.
Expand Down Expand Up @@ -226,7 +226,7 @@ we are writing next.

We can now write a middleware that will check the auth status of any request,
guarding any protected routes. You can read up on middlewares and where to put
them [in the docs](https://fresh.deno.dev/docs/1.x/concepts/middleware).
them [in the docs](https://usefresh.dev/docs/1.x/concepts/middleware).

```ts routes/_middleware.ts
import { FreshContext } from "$fresh/server.ts";
Expand Down
4 changes: 2 additions & 2 deletions docs/1.x/examples/changing-the-src-dir.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ description: |
Change the source directory to effectively manage your project.
---

When you initialize a project with `deno run -A -r https://fresh.deno.dev`,
you'll end up with a project like the following:
When you initialize a project with `deno run -A -r https://usefresh.dev`, you'll
end up with a project like the following:

```txt-files Project Structure
<project root>
Expand Down
2 changes: 1 addition & 1 deletion docs/1.x/examples/rendering-markdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ possibilities:
3. the markdown is on a file

The following file uses
[dynamic routing](https://fresh.deno.dev/docs/getting-started/dynamic-routes) to
[dynamic routing](https://usefresh.dev/docs/getting-started/dynamic-routes) to
handle the three cases. It's assumed this file is called `[slug].tsx`:

```ts routes/[slug].tsx
Expand Down
4 changes: 2 additions & 2 deletions docs/1.x/examples/setting-the-language.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ description: |
Set the lang attribute in the <html> tag.
---

When you initialize a project with `deno run -A -r https://fresh.deno.dev`,
you'll end up with a `main.ts` like the following:
When you initialize a project with `deno run -A -r https://usefresh.dev`, you'll
end up with a `main.ts` like the following:

```ts main.ts
/// <reference no-default-lib="true" />
Expand Down
4 changes: 2 additions & 2 deletions docs/1.x/examples/using-twind-v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ description: |
With a few tweaks one can use twind v1
---

When you initialize a project with `deno run -A -r https://fresh.deno.dev`,
you'll end up with a `main.ts` like the following:
When you initialize a project with `deno run -A -r https://usefresh.dev`, you'll
end up with a `main.ts` like the following:

```ts main.ts
/// <reference no-default-lib="true" />
Expand Down
2 changes: 1 addition & 1 deletion docs/1.x/getting-started/create-a-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ will scaffold out a new project with some example files to get you started.
To create a new project, run:

```sh Terminal
deno run -A -r https://fresh.deno.dev
deno run -A -r https://usefresh.dev
cd fresh-project
deno task start
```
Expand Down
2 changes: 1 addition & 1 deletion docs/latest/contributing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Fresh is organized as a monorepo with multiple packages:
- **`packages/plugin-tailwindcss-v3/`** - Tailwind CSS v3 plugin
- **`packages/init/`** - Project scaffolding tool
- **`packages/update/`** - Fresh update utilities
- **`www/`** - Documentation website (fresh.deno.dev)
- **`www/`** - Documentation website (usefresh.dev)

## Getting Started

Expand Down
2 changes: 1 addition & 1 deletion packages/build-id/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* // `BUILD_ID` is based on the `DENO_DEPLOYMENT_ID` environment variable.
* ```
*
* @see https://fresh.deno.dev/docs/deployment/docker
* @see https://usefresh.dev/docs/deployment/docker
*
* @module
* @private
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This package contains examples for using Fresh with [JSR](https://jsr.io/).

Learn more about the Fresh framework here:
[https://fresh.deno.dev/](https://fresh.deno.dev/)
[https://usefresh.dev/](https://usefresh.dev/)

## Usage: Island example

Expand Down
4 changes: 2 additions & 2 deletions packages/fresh/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Fresh is a small, fast and extensible full stack web framework built on Web
Standards. It’s designed for building high-quality, performant, and personalized
web applications.

[Learn more about Fresh](https://fresh.deno.dev/)
[Learn more about Fresh](https://usefresh.dev/)

## Usage

Expand All @@ -28,4 +28,4 @@ app.listen();
```

For more information on getting started with Fresh, head on over to the
[documentation](https://fresh.deno.dev/docs/introduction).
[documentation](https://usefresh.dev/docs/introduction).
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function automaticWorkspaceFolders<T>(root: string): Middleware<T> {
uuid ??= await generate(
NAMESPACE_URL,
new TextEncoder().encode(
`https://fresh.deno.dev?root=${encodeURIComponent(root)}&v=${0}`,
`https://usefresh.dev?root=${encodeURIComponent(root)}&v=${0}`,
),
);
content ??= JSON.stringify({ workspace: { root, uuid } }, undefined, 2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ snapshot[`round trip - { a: 1, b: null, c: -2 } 1`] = `'[{"a":1,"b":-2,"c":2},1,

snapshot[`round trip - Uint8Array(3) [ 1, 2, 3 ] 1`] = `'[["Uint8Array","AQID"]]'`;

snapshot[`round trip - URL {\\n href: 'https://fresh.deno.dev/',\\n origin: 'https://fresh.deno.dev',\\n protocol: 'https:',\\n username: '',\\n password: '',\\n host: 'fresh.deno.dev',\\n hostname: 'fresh.deno.dev',\\n port: '',\\n pathname: '/',\\n hash: '',\\n search: ''\\n} 1`] = `'[["URL","https://fresh.deno.dev/"]]'`;
snapshot[`round trip - URL {\\n href: 'https://usefresh.dev/',\\n origin: 'https://usefresh.dev',\\n protocol: 'https:',\\n username: '',\\n password: '',\\n host: 'usefresh.dev',\\n hostname: 'usefresh.dev',\\n port: '',\\n pathname: '/',\\n hash: '',\\n search: ''\\n} 1`] = `'[["URL","https://usefresh.dev/"]]'`;

snapshot[`round trip - 1990-05-31T00:00:00.000Z 1`] = `'[["Date","1990-05-31T00:00:00.000Z"]]'`;

Expand Down
2 changes: 1 addition & 1 deletion packages/fresh/src/jsonify/round_trip_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const TESTS = [
[null, undefined, -2],
{ a: 1, b: null, c: -2 },
new Uint8Array([1, 2, 3]),
new URL("https://fresh.deno.dev"),
new URL("https://usefresh.dev"),
new Date("1990-05-31"),
new Date("Invalid Date"),
new Map([[1, null], [undefined, -2]]),
Expand Down
2 changes: 1 addition & 1 deletion packages/fresh/src/server/tailwind_aot_error_page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const LINK = "https://fresh.deno.dev/docs/concepts/ahead-of-time-builds";
const LINK = "https://usefresh.dev/docs/concepts/ahead-of-time-builds";

export default function TailwindErrorPage() {
return (
Expand Down
4 changes: 2 additions & 2 deletions packages/init/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ This is a CLI tool to bootstrap a new Fresh project. To do so, run this command:
deno run -Ar jsr:@fresh/init
```

Go to [https://fresh.deno.dev/](https://fresh.deno.dev/) for more information
about Fresh.
Go to [https://usefresh.dev/](https://usefresh.dev/) for more information about
Fresh.
4 changes: 2 additions & 2 deletions packages/init/src/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ import "./assets/styles.css";`,
await writeFile("static/logo.svg", STATIC_LOGO);

try {
const res = await fetch("https://fresh.deno.dev/favicon.ico");
const res = await fetch("https://usefresh.dev/favicon.ico");
const buf = await res.arrayBuffer();
await writeFile("static/favicon.ico", new Uint8Array(buf));
} catch {
Expand Down Expand Up @@ -652,7 +652,7 @@ import { fresh } from "@fresh/plugin-vite";\n`;
const README_MD = `# Fresh project

Your new Fresh project is ready to go. You can follow the Fresh "Getting
Started" guide here: https://fresh.deno.dev/docs/getting-started
Started" guide here: https://usefresh.dev/docs/getting-started

### Usage

Expand Down
3 changes: 1 addition & 2 deletions packages/plugin-tailwindcss-v3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,4 @@ tailwind(builder, {
});
```

To learn more about Fresh go to
[https://fresh.deno.dev/](https://fresh.deno.dev/).
To learn more about Fresh go to [https://usefresh.dev/](https://usefresh.dev/).
3 changes: 1 addition & 2 deletions packages/plugin-tailwindcss/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,4 @@ if (Deno.args.includes("build")) {
}
```

To learn more about Fresh go to
[https://fresh.deno.dev/](https://fresh.deno.dev/).
To learn more about Fresh go to [https://usefresh.dev/](https://usefresh.dev/).
4 changes: 2 additions & 2 deletions packages/plugin-vite/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Fresh vite plugin

Vite plugin for [Fresh](https://fresh.deno.dev).
Vite plugin for [Fresh](https://usefresh.dev).

## Usage

Expand Down Expand Up @@ -34,4 +34,4 @@ Vite plugin for [Fresh](https://fresh.deno.dev).
- Build: `vite build`

More information
[on the Fresh documentation](https://fresh.deno.dev/docs/advanced/vite) .
[on the Fresh documentation](https://usefresh.dev/docs/advanced/vite) .
4 changes: 2 additions & 2 deletions packages/update/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ run this command:
deno run -Ar jsr:@fresh/update
```

Go to [https://fresh.deno.dev/](https://fresh.deno.dev/) for more information
about Fresh.
Go to [https://usefresh.dev/](https://usefresh.dev/) for more information about
Fresh.
2 changes: 1 addition & 1 deletion packages/update/src/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ export async function updateProject(dir: string) {
delete tasks.cli;
}

if (tasks.update === "deno run -A -r https://fresh.deno.dev/update .") {
if (tasks.update === "deno run -A -r https://usefresh.dev/update .") {
tasks.update = "deno run -A -r jsr:@fresh/update .";
}

Expand Down
2 changes: 1 addition & 1 deletion packages/update/src/update_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Deno.test("update - 1.x project deno.json tasks + lock", async () => {
"start": "deno run -A --watch=static/,routes/ dev.ts",
"build": "deno run -A dev.ts build",
"preview": "deno run -A main.ts",
"update": "deno run -A -r https://fresh.deno.dev/update ."
"update": "deno run -A -r https://usefresh.dev/update ."
}
}`,
});
Expand Down
9 changes: 9 additions & 0 deletions www/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
import { App, staticFiles, trailingSlashes } from "fresh";

export const app = new App()
.use(async (ctx) => {
// redirect fresh.deno.dev to usefresh.dev
if (ctx.url.origin === "https://fresh.deno.dev") {
const newUrl = new URL(ctx.url);
newUrl.hostname = "usefresh.dev";
return Response.redirect(newUrl, 307);
}
return await ctx.next();
})
.use(staticFiles())
.use(trailingSlashes("never"))
.fsRoutes();
Loading