2025-01-04 02:47:38 -08:00
|
|
|
import * as pages from '~/utils/page_updater/update_pagelist';
|
|
|
|
|
2025-01-04 12:20:53 -08:00
|
|
|
const blog_list: pages.PageList = (await import('./assets/meta/post_list.json')) as pages.PageList;
|
2025-01-04 02:47:38 -08:00
|
|
|
|
2025-01-04 11:45:02 -08:00
|
|
|
// nitro only needs string array
|
|
|
|
const blog_nitro_routes: any = [];
|
|
|
|
// key value
|
|
|
|
for (let [key, category] of Object.entries(blog_list.categories)) {
|
|
|
|
for (let post of category.posts) {
|
|
|
|
blog_nitro_routes.push('/article' + post.url);
|
2025-01-04 02:47:38 -08:00
|
|
|
}
|
2025-01-04 11:45:02 -08:00
|
|
|
}
|
|
|
|
console.log(blog_nitro_routes);
|
2025-01-04 02:47:38 -08:00
|
|
|
|
2024-12-21 19:11:09 -08:00
|
|
|
// https://nuxt.com/docs/api/configuration/nuxt-config
|
|
|
|
export default defineNuxtConfig({
|
|
|
|
compatibilityDate: '2024-11-01',
|
2025-01-04 02:47:38 -08:00
|
|
|
ssr: true,
|
2024-12-21 19:11:09 -08:00
|
|
|
postcss: {
|
|
|
|
plugins: {
|
|
|
|
tailwindcss: {},
|
|
|
|
autoprefixer: {},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
app: {
|
2024-12-22 12:22:47 -08:00
|
|
|
pageTransition: {
|
|
|
|
name: 'page',
|
|
|
|
mode: 'out-in'
|
|
|
|
},
|
2024-12-21 19:11:09 -08:00
|
|
|
},
|
|
|
|
modules: [
|
2025-01-04 02:47:38 -08:00
|
|
|
'nuxt-particles',
|
|
|
|
'@nuxt/content'
|
2024-12-21 19:11:09 -08:00
|
|
|
],
|
2025-01-04 02:47:38 -08:00
|
|
|
content: {
|
|
|
|
// ... options
|
|
|
|
|
|
|
|
},
|
2025-01-04 11:45:02 -08:00
|
|
|
nitro: {
|
|
|
|
prerender: {
|
|
|
|
routes: blog_nitro_routes
|
|
|
|
}
|
|
|
|
},
|
2024-12-21 19:11:09 -08:00
|
|
|
particles: {
|
|
|
|
mode: 'slim',
|
|
|
|
lazy: true
|
|
|
|
}
|
|
|
|
})
|