export default defineNuxtConfig({ site: { name: 'TNT', description: null, url: 'https://tnt.thombruce.com', copyright: null, nav: true, backgroundPattern: false, }, })
ts: nuxt.config.ts
export default defineNuxtConfig({ routeRules: { /* Custom route rules */ '/docs': { redirect: '/docs/getting-started/installation' }, '/docs/getting-started': { redirect: '/docs/getting-started/installation' }, }, })
ts: nuxt.config.ts
export default defineNuxtConfig({ runtimeConfig: { public: { collections: [ /* Custom content collections */ 'blog', 'docs', ], }, }, })
ts: nuxt.config.ts
NOTE: The pages
collection is the only collection defined by default. If you wish to define your own, you should redefine it in order to exclude your custom collections.
import { defineCollection, defineContentConfig, z } from '@nuxt/content' import { global } from '@thombruce/tnt-content/content.config' export default defineContentConfig({ collections: { // Pages: E.g. /index.md, /about.md pages: defineCollection({ source: { include: '**/*', exclude: [ '.*', '.*/**/*', '*blog/**/*', '*docs/**/*', ] }, type: 'page', schema: z.object({ ...global, }) }), // Blog: Blog posts blog: defineCollection({ source: [ { include: '*blog/**/*', exclude: [ '*blog/**/.*', '*blog/**/.*/**/*', ] }, { include: '*blog/**/.navigation.y?(a)ml', }, ], type: 'page', schema: z.object({ ...global, layout: z.string().default('article'), category: z.string().optional(), }) }), // Docs: Documentation docs: defineCollection({ source: [ { include: '*docs/**/*', exclude: [ '*docs/**/.*', '*docs/**/.*/**/*', ] }, { include: '*docs/**/.navigation.y?(a)ml', }, ], type: 'page', schema: z.object({ ...global, layout: z.string().default('doc'), category: z.string().optional(), }) }), } })
ts: content.config.ts
export default defineNuxtConfig({ ui: { theme: { colors: [ 'primary', 'secondary', 'success', 'info', 'warning', 'error', 'neutral', ], }, }, })
ts: nuxt.config.ts
export default defineAppConfig({ ui: { colors: { primary: 'green', secondary: 'blue', success: 'green', info: 'blue', warning: 'yellow', error: 'red', neutral: 'slate', } } })
ts: app.config.ts