mirror of
https://iceshrimp.dev/Crimekillz/jointrashposs.git
synced 2024-11-22 00:43:50 +01:00
(fix) generate international docs routes
This commit is contained in:
parent
29362ff75e
commit
9afe425203
@ -52,16 +52,10 @@ definePageMeta({
|
||||
layout: 'docs',
|
||||
});
|
||||
|
||||
defineI18nRoute({
|
||||
//locales: (locales.value as LocaleObject[]).map((e) => e.code),
|
||||
// 【一時対応】とりあえずビルドできるようにする
|
||||
locales: ['ja'],
|
||||
});
|
||||
|
||||
const route = useRoute();
|
||||
const slugs = (route.params.slug as string[]).filter((v) => v !== '');
|
||||
|
||||
const { data } = await useAsyncData(`blog-${locale.value}-${slugs.join('-')}`, () => queryContent(`/${locale.value}/docs/${slugs.join('/')}`).findOne());
|
||||
const { data } = await useAsyncData(`docs-${locale.value}-${slugs.join('-')}`, () => queryContent(`/${locale.value}/docs/${slugs.join('/')}`).findOne());
|
||||
|
||||
if (!data.value) {
|
||||
throw createError({ statusCode: 404, statusMessage: 'page not found' });
|
||||
|
Loading…
Reference in New Issue
Block a user