From ed8ffedde5c6f5755303518b3e1168bab3dfec11 Mon Sep 17 00:00:00 2001 From: Arthur DANJOU Date: Mon, 22 Dec 2025 19:38:49 +0100 Subject: [PATCH] feat: ajouter de nouvelles collections et modifier la configuration de Nuxt --- content.config.ts | 112 ++++++++++++++++++++++++++++++++++++++++++++-- nuxt.config.ts | 56 +++++------------------ 2 files changed, 119 insertions(+), 49 deletions(-) diff --git a/content.config.ts b/content.config.ts index f784e44..719c5d8 100644 --- a/content.config.ts +++ b/content.config.ts @@ -1,8 +1,114 @@ -import { defineCollection } from '@nuxt/content' +import { defineCollection, z } from '@nuxt/content' export const collections = { - main: defineCollection({ + index: defineCollection({ type: 'page', - source: 'home/*.md' + source: 'index.md' + }), + projects: defineCollection({ + type: 'data', + source: 'projects/*.md', + schema: z.object({ + slug: z.string(), + title: z.string(), + type: z.string().optional(), + description: z.string(), + publishedAt: z.string(), + readingTime: z.number().optional(), + tags: z.array(z.string()), + cover: z.string().optional(), + favorite: z.boolean().optional(), + status: z.string().optional(), + emoji: z.string().optional() + }) + }), + uses: defineCollection({ + type: 'page', + source: 'uses.md' + }), + skills: defineCollection({ + type: 'data', + source: 'skills.json', + schema: z.object({ + description: z.string(), + skills: z.array(z.object({ + id: z.string(), + name: z.string(), + description: z.string().optional(), + items: z.array(z.object({ + name: z.string(), + icon: z.string().optional() + })) + })) + }) + }), + experiences: defineCollection({ + type: 'data', + source: 'experiences/*.md', + schema: z.object({ + title: z.string(), + type: z.string().optional(), + company: z.string(), + companyUrl: z.string().url().optional(), + startDate: z.string(), + endDate: z.string().optional(), + duration: z.string().optional(), + location: z.string(), + description: z.string(), + tags: z.array(z.string()).optional(), + emoji: z.string().optional() + }) + }), + education: defineCollection({ + type: 'data', + source: 'education/*.md', + schema: z.object({ + title: z.string(), + type: z.string().optional(), + degree: z.string().optional(), + institution: z.string(), + startDate: z.string(), + endDate: z.string().optional(), + duration: z.string().optional(), + location: z.string(), + description: z.string().optional(), + tags: z.array(z.string()).optional(), + emoji: z.string().optional() + }) + }), + contact: defineCollection({ + type: 'data', + source: 'contact.json', + schema: z.object({ + contact: z.array(z.object({ + id: z.string(), + name: z.string(), + description: z.string().optional(), + category: z.string().optional(), + icon: z.string().optional(), + value: z.string().url(), + username: z.string().optional(), + priority: z.number().optional() + })) + }) + }), + hobbies: defineCollection({ + type: 'page', + source: 'hobbies.md' + }), + languages: defineCollection({ + type: 'data', + source: 'languages.json', + schema: z.object({ + languages: z.array(z.object({ + name: z.string(), + level: z.string(), + proficiency: z.string() + })) + }) + }), + profile: defineCollection({ + type: 'page', + source: 'profile.md' }) } diff --git a/nuxt.config.ts b/nuxt.config.ts index cd51d78..54048aa 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -7,7 +7,6 @@ export default defineNuxtConfig({ '@nuxthub/core', '@nuxt/eslint', '@vueuse/nuxt', - '@nuxtjs/i18n', 'nuxt-studio' ], @@ -63,28 +62,17 @@ export default defineNuxtConfig({ }, runtimeConfig: { - api: { - url: '' + discord: { + userId: '', + id: '' }, - public: { - i18n: { - baseUrl: '' - } - } - }, - - routeRules: { - '/api/activity': { - proxy: `${process.env.NUXT_API_URL}/api/activity` - }, - '/api/stats': { - proxy: `${process.env.NUXT_API_URL}/api/stats` - }, - '/api/uses': { - proxy: `${process.env.NUXT_API_URL}/api/uses` - }, - '/api/': { - proxy: `${process.env.NUXT_API_URL}/api/` + statusPage: '', + wakatime: { + userId: '', + coding: '', + editors: '', + languages: '', + os: '' } }, @@ -116,30 +104,6 @@ export default defineNuxtConfig({ } }, - i18n: { - strategy: 'no_prefix', - locales: [ - { - label: 'English', - code: 'en', - language: 'en-EN', - icon: 'i-twemoji-flag-united-kingdom' - }, - { - label: 'Français', - code: 'fr', - language: 'fr-FR', - icon: 'i-twemoji-flag-france' - }, - { - label: 'Español', - code: 'es', - language: 'es-ES', - icon: 'i-twemoji-flag-spain' - } - ], - defaultLocale: 'en' - }, studio: { route: '/studio', repository: {