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(),
|
||||||
|
}),
|
||||||
|
})
|
||||||
|
)
|
||||||
|
},
|
||||||
|
})
|
||||||
+72
-77
@@ -1,78 +1,73 @@
|
|||||||
import tailwindcss from "@tailwindcss/vite";
|
import tailwindcss from "@tailwindcss/vite";
|
||||||
|
|
||||||
// https://nuxt.com/docs/api/configuration/nuxt-config
|
// https://nuxt.com/docs/api/configuration/nuxt-config
|
||||||
export default defineNuxtConfig({
|
export default defineNuxtConfig({
|
||||||
compatibilityDate: '2025-05-15',
|
compatibilityDate: '2025-05-15',
|
||||||
devtools: { enabled: false },
|
devtools: { enabled: false },
|
||||||
css: ["/assets/css/main.css"],
|
css: ["/assets/css/main.css"],
|
||||||
vite: {
|
vite: {
|
||||||
plugins: [
|
plugins: [
|
||||||
tailwindcss(),
|
tailwindcss(),
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
runtimeConfig: {
|
runtimeConfig: {
|
||||||
public: {
|
public: {
|
||||||
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'}`,
|
||||||
meta: [
|
meta: [
|
||||||
{ name: 'description', content: `Just another personal website, Created by ${process.env.NUXT_PUBLIC_AUTHOR}` },
|
{ name: 'description', content: `Just another personal website, Created by ${process.env.NUXT_PUBLIC_AUTHOR}` },
|
||||||
{ name: 'referrer', content: 'strict-origin-when-cross-origin' },
|
{ name: 'referrer', content: 'strict-origin-when-cross-origin' },
|
||||||
{ name: 'canonical', content: process.env.NUXT_PUBLIC_BASE_URL },
|
{ name: 'canonical', content: process.env.NUXT_PUBLIC_BASE_URL },
|
||||||
{ name: 'robots', content: 'index,follow' },
|
{ name: 'robots', content: 'index,follow' },
|
||||||
{ name: 'author', content: process.env.NUXT_PUBLIC_AUTHOR },
|
{ name: 'author', content: process.env.NUXT_PUBLIC_AUTHOR },
|
||||||
{ name: 'application-name', content: process.env.NUXT_PUBLIC_SITE_NAME },
|
{ name: 'application-name', content: process.env.NUXT_PUBLIC_SITE_NAME },
|
||||||
{ name: 'keywords', content: 'techit, techit thawiang, techit, techitwinner, thawiang, dailitation, dtt, dailitation.xyz' },
|
{ name: 'keywords', content: 'techit, techit thawiang, techit, techitwinner, thawiang, dailitation, dtt, dailitation.xyz' },
|
||||||
{ name: 'theme-color', content: '#1355BE' },
|
{ name: 'theme-color', content: '#1355BE' },
|
||||||
// Open Graph
|
// Open Graph
|
||||||
{ property: 'og:title', content: `${process.env.NUXT_PUBLIC_SITE_NAME} by ${process.env.NUXT_PUBLIC_AUTHOR}` },
|
{ property: 'og:title', content: `${process.env.NUXT_PUBLIC_SITE_NAME} by ${process.env.NUXT_PUBLIC_AUTHOR}` },
|
||||||
{ property: 'og:description', content: `Just another personal website, Created by ${process.env.NUXT_PUBLIC_AUTHOR}` },
|
{ property: 'og:description', content: `Just another personal website, Created by ${process.env.NUXT_PUBLIC_AUTHOR}` },
|
||||||
{ property: 'og:url', content: process.env.NUXT_PUBLIC_BASE_URL },
|
{ property: 'og:url', content: process.env.NUXT_PUBLIC_BASE_URL },
|
||||||
{ property: 'og:site_name', content: process.env.NUXT_PUBLIC_BASE_URL },
|
{ property: 'og:site_name', content: process.env.NUXT_PUBLIC_BASE_URL },
|
||||||
{ property: 'og:type', content: 'website' },
|
{ property: 'og:type', content: 'website' },
|
||||||
{ property: 'og:locale', content: 'en_US' },
|
{ property: 'og:locale', content: 'en_US' },
|
||||||
// Twitter
|
// Twitter
|
||||||
{ name: 'twitter:creator', content: '@techitwinner' },
|
{ name: 'twitter:creator', content: '@techitwinner' },
|
||||||
{ name: 'twitter:site', content: '@techitwinner' },
|
{ name: 'twitter:site', content: '@techitwinner' },
|
||||||
{ name: 'twitter:card', content: 'summary' },
|
{ name: 'twitter:card', content: 'summary' },
|
||||||
{ name: 'twitter:url', content: process.env.NUXT_PUBLIC_BASE_URL },
|
{ name: 'twitter:url', content: process.env.NUXT_PUBLIC_BASE_URL },
|
||||||
{ name: 'twitter:image', content: '' },
|
{ name: 'twitter:image', content: '' },
|
||||||
// Apple Web App
|
// Apple Web App
|
||||||
{ name: 'mobile-web-app-capable', content: 'yes' },
|
{ name: 'mobile-web-app-capable', content: 'yes' },
|
||||||
{ name: 'apple-mobile-web-app-capable', content: 'yes' },
|
{ name: 'apple-mobile-web-app-capable', content: 'yes' },
|
||||||
{ name: 'apple-mobile-web-app-status-bar-style', content: 'black' },
|
{ name: 'apple-mobile-web-app-status-bar-style', content: 'black' },
|
||||||
{ name: 'apple-mobile-web-app-title', content: process.env.NUXT_PUBLIC_AUTHOR }
|
{ name: 'apple-mobile-web-app-title', content: process.env.NUXT_PUBLIC_AUTHOR }
|
||||||
],
|
],
|
||||||
htmlAttrs: {
|
htmlAttrs: {
|
||||||
lang: 'en',
|
lang: 'en',
|
||||||
},
|
},
|
||||||
charset: 'utf-8',
|
charset: 'utf-8',
|
||||||
viewport: 'width=device-width, initial-scale=1',
|
viewport: 'width=device-width, initial-scale=1',
|
||||||
link: [
|
link: [
|
||||||
{ 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' },
|
script: [
|
||||||
{ rel: 'stylesheet', href: '/fonts/noto/mono/noto+sans+mono.css' },
|
// { src: '/js/ripple.js', type: 'text/javascript', defer: true },
|
||||||
// { rel: 'stylesheet', href: '/fonts/roboto/mono/mono.css' },
|
{ src: '/js/nav.js', type: 'text/javascript', defer: true }
|
||||||
// { rel: 'stylesheet', href: '/fonts/roboto/serif/serif.css' },
|
]
|
||||||
{ rel: 'stylesheet', href: '/fonts/noto/thai/noto+sans+thai.css' },
|
},
|
||||||
],
|
},
|
||||||
script: [
|
icon: {
|
||||||
//{ src: '/js/ripple.js', type: 'text/javascript', defer: true }
|
customCollections: [
|
||||||
]
|
{ prefix: 'oundr', dir: './assets/icons/oundr' },
|
||||||
},
|
{ prefix: 'arpsh', dir: './assets/icons/arpsh' }
|
||||||
},
|
]
|
||||||
icon: {
|
}
|
||||||
customCollections: [
|
|
||||||
{ prefix: 'oundr', dir: './assets/icons/oundr' },
|
|
||||||
{ prefix: 'arpsh', dir: './assets/icons/arpsh' }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
Reference in New Issue
Block a user