Add nuxt content supports
This commit is contained in:
@@ -0,0 +1,31 @@
|
|||||||
|
import { defineContentConfig, defineCollection, z } from '@nuxt/content'
|
||||||
|
import { asSitemapCollection } from '@nuxtjs/sitemap/content'
|
||||||
|
|
||||||
|
export default defineContentConfig({
|
||||||
|
collections: {
|
||||||
|
posts: defineCollection(
|
||||||
|
asSitemapCollection({
|
||||||
|
type: 'page',
|
||||||
|
source: '**/posts/**/*.md',
|
||||||
|
schema: z.object({
|
||||||
|
coverImage: z.string(),
|
||||||
|
tags: z.array(z.string()),
|
||||||
|
dateCreated: z.string().datetime(),
|
||||||
|
dateUpdated: z.string().datetime(),
|
||||||
|
}),
|
||||||
|
})
|
||||||
|
),
|
||||||
|
projects: defineCollection(
|
||||||
|
asSitemapCollection({
|
||||||
|
type: 'page',
|
||||||
|
source: '**/projects/**/*.md',
|
||||||
|
schema: z.object({
|
||||||
|
logo: z.string(),
|
||||||
|
tags: z.array(z.string()),
|
||||||
|
dateCreated: z.string().datetime(),
|
||||||
|
dateUpdated: z.string().datetime(),
|
||||||
|
}),
|
||||||
|
})
|
||||||
|
)
|
||||||
|
},
|
||||||
|
})
|
||||||
+4
-9
@@ -15,7 +15,7 @@ export default defineNuxtConfig({
|
|||||||
baseUrl: process.env.NUXT_PUBLIC_BASE_URL
|
baseUrl: process.env.NUXT_PUBLIC_BASE_URL
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
modules: ['@nuxt/content', '@nuxt/image', '@nuxt/eslint', '@nuxtjs/color-mode', '@nuxt/icon'],
|
modules: ['@nuxt/content', '@nuxtjs/sitemap', '@nuxt/image', '@nuxt/eslint', '@nuxtjs/color-mode', '@nuxt/icon'],
|
||||||
app: {
|
app: {
|
||||||
head: {
|
head: {
|
||||||
titleTemplate: `%s / ${process.env.NUXT_PUBLIC_SITE_NAME || 'thawia.ng'}`,
|
titleTemplate: `%s / ${process.env.NUXT_PUBLIC_SITE_NAME || 'thawia.ng'}`,
|
||||||
@@ -56,16 +56,11 @@ export default defineNuxtConfig({
|
|||||||
{ rel: 'icon', type: 'image/vnd.microsoft.icon', href: '/favicon.ico' },
|
{ rel: 'icon', type: 'image/vnd.microsoft.icon', href: '/favicon.ico' },
|
||||||
// { rel: 'stylesheet', href: '/style.css' },
|
// { rel: 'stylesheet', href: '/style.css' },
|
||||||
// TYPEFACES
|
// TYPEFACES
|
||||||
// { rel: 'stylesheet', href: '/fonts/roboto/roboto.css' },
|
{ rel: 'stylesheet', href: '/fonts/inter/inter.css' },
|
||||||
{ rel: 'stylesheet', href: '/fonts/tiktoksans/tiktoksans.css' },
|
|
||||||
// { rel: 'stylesheet', href: '/fonts/noto/thai/noto+sans.css' },
|
|
||||||
{ rel: 'stylesheet', href: '/fonts/noto/mono/noto+sans+mono.css' },
|
|
||||||
// { rel: 'stylesheet', href: '/fonts/roboto/mono/mono.css' },
|
|
||||||
// { rel: 'stylesheet', href: '/fonts/roboto/serif/serif.css' },
|
|
||||||
{ rel: 'stylesheet', href: '/fonts/noto/thai/noto+sans+thai.css' },
|
|
||||||
],
|
],
|
||||||
script: [
|
script: [
|
||||||
//{ src: '/js/ripple.js', type: 'text/javascript', defer: true }
|
// { src: '/js/ripple.js', type: 'text/javascript', defer: true },
|
||||||
|
{ src: '/js/nav.js', type: 'text/javascript', defer: true }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user