docs: update Fresh 2 migration info (#3161)
This commit is contained in:
@@ -1,13 +1,11 @@
|
||||
import type { FreshContext } from "fresh";
|
||||
import type { Context } from "fresh";
|
||||
|
||||
const REDIRECTS: Record<string, string> = {
|
||||
"/docs/getting-started/fetching-data":
|
||||
"/docs/getting-started/custom-handlers",
|
||||
};
|
||||
|
||||
export async function handler(
|
||||
ctx: FreshContext,
|
||||
) {
|
||||
export async function handler<T>(ctx: Context<T>) {
|
||||
// Redirect from old doc URLs to new ones
|
||||
const redirect = REDIRECTS[ctx.url.pathname];
|
||||
if (redirect) {
|
||||
|
||||
Reference in New Issue
Block a user