Chrysoblog/src/hooks.ts

12 lines
240 B
TypeScript
Raw Normal View History

2024-09-29 18:45:35 -07:00
import type { Reroute } from '@sveltejs/kit';
const translated: Record<string, string> = {
'/post': '/page/1',
};
export const reroute: Reroute = ({ url }) => {
if (url.pathname in translated) {
return translated[url.pathname];
}
};