feat/static-pages #21

Merged
palid merged 5 commits from feat/static-pages into main 2025-02-15 00:22:14 +00:00
Showing only changes of commit 9fc91d9480 - Show all commits

View file

@ -9,7 +9,12 @@ export default async function Page({
const { slug, locale } = await params const { slug, locale } = await params
const currentLocale = getLocale(locale) const currentLocale = getLocale(locale)
console.log(slug, locale) const isReallyProperSlug = /^[a-zA-Z0-9_-]+$/.test(slug)
if (!isReallyProperSlug) {
notFound()
}
try { try {
const path = `@/pages/${currentLocale}/${slug}.mdx` const path = `@/pages/${currentLocale}/${slug}.mdx`
const pagemodule = await import(path) const pagemodule = await import(path)