feat: Integrate Directus CMS, add i18n with next-intl, and configure project tooling with pnpm, husky, and commitlint.**
This commit is contained in:
18
middleware.ts
Normal file
18
middleware.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import createMiddleware from "next-intl/middleware";
|
||||
|
||||
export default createMiddleware({
|
||||
// A list of all locales that are supported
|
||||
locales: ["de"],
|
||||
|
||||
// Used when no locale matches
|
||||
defaultLocale: "de",
|
||||
|
||||
// Use default locale without prefix
|
||||
localePrefix: "as-needed",
|
||||
});
|
||||
|
||||
export const config = {
|
||||
// Matcher for all pages and internationalized pathnames
|
||||
// excluding api, _next, static files, etc.
|
||||
matcher: ["/((?!api|_next|_vercel|.*\\..*).*)", "/", "/(de)/:path*"],
|
||||
};
|
||||
Reference in New Issue
Block a user