mirror of
https://iceshrimp.dev/Crimekillz/jointrashposs.git
synced 2024-11-25 10:19:07 +01:00
(temp workaround) build
This commit is contained in:
parent
14d050b05d
commit
aebc9b6f07
@ -97,7 +97,9 @@ export default defineNuxtConfig({
|
|||||||
prerender: {
|
prerender: {
|
||||||
routes: [
|
routes: [
|
||||||
"/404.html"
|
"/404.html"
|
||||||
]
|
],
|
||||||
|
// 【一時対応】とりあえずビルドできるようにする
|
||||||
|
failOnError: false,
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
'@/server/plugins/appendComment.ts',
|
'@/server/plugins/appendComment.ts',
|
||||||
|
@ -29,7 +29,9 @@ definePageMeta({
|
|||||||
});
|
});
|
||||||
|
|
||||||
defineI18nRoute({
|
defineI18nRoute({
|
||||||
locales: (locales.value as LocaleObject[]).map((e) => e.code),
|
//locales: (locales.value as LocaleObject[]).map((e) => e.code),
|
||||||
|
// 【一時対応】とりあえずビルドできるようにする
|
||||||
|
locales: ['ja'],
|
||||||
});
|
});
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
@ -38,6 +40,10 @@ 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(`blog-${locale.value}-${slugs.join('-')}`, () => queryContent(`/${locale.value}/docs/${slugs.join('/')}`).findOne());
|
||||||
const { navigation } = await useAsyncData('navigation', () => fetchContentNavigation());
|
const { navigation } = await useAsyncData('navigation', () => fetchContentNavigation());
|
||||||
|
|
||||||
|
if (!data.value) {
|
||||||
|
throw createError({ statusCode: 404, statusMessage: 'page not found' });
|
||||||
|
}
|
||||||
|
|
||||||
route.meta.title = data.value?.title;
|
route.meta.title = data.value?.title;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -5,15 +5,12 @@ import { Readable } from 'stream';
|
|||||||
import { writeFileSync } from 'fs';
|
import { writeFileSync } from 'fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
|
||||||
// サイトドメインを指定(最後スラッシュ不要)
|
|
||||||
//const domain = useRuntimeConfig().public.baseUrl;
|
|
||||||
const domain = "your-app.com";
|
|
||||||
|
|
||||||
export default async function genSitemap(nitro: Nitro) {
|
export default async function genSitemap(nitro: Nitro) {
|
||||||
if (!nitro._prerenderedRoutes) {
|
if (!nitro._prerenderedRoutes) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const domain = nitro.options.runtimeConfig.public.baseUrl;
|
||||||
const publicDir = nitro.options.output.publicDir;
|
const publicDir = nitro.options.output.publicDir;
|
||||||
|
|
||||||
const routes = nitro._prerenderedRoutes?.map((e) => e.fileName || null).filter((e, i, a) => e && a.indexOf(e) === i && e.endsWith("index.html")).map((e) => {
|
const routes = nitro._prerenderedRoutes?.map((e) => e.fileName || null).filter((e, i, a) => e && a.indexOf(e) === i && e.endsWith("index.html")).map((e) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user