mirror of
https://github.com/ArthurDanjou/artapi.git
synced 2026-01-23 12:50:27 +01:00
Amélioration de la configuration du contenu et ajout de nouvelles ressources : mise à jour des collections de profil et de mathématiques, correction des types de fichiers, et ajustement des titres des ressources.
This commit is contained in:
@@ -112,31 +112,13 @@ export default defineContentConfig({
|
|||||||
}))
|
}))
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
|
mathematics: defineCollection({
|
||||||
|
type: 'page',
|
||||||
|
source: 'mathematics.md'
|
||||||
|
}),
|
||||||
profile: defineCollection({
|
profile: defineCollection({
|
||||||
type: 'page',
|
type: 'page',
|
||||||
source: 'profile.json',
|
source: 'profile.md'
|
||||||
schema: z.object({
|
|
||||||
shortBio: z.string(),
|
|
||||||
location: z.object({
|
|
||||||
current: z.string(),
|
|
||||||
timezone: z.string(),
|
|
||||||
remote: z.boolean()
|
|
||||||
}),
|
|
||||||
availability: z.object({
|
|
||||||
status: z.string(),
|
|
||||||
types: z.array(z.string()),
|
|
||||||
preferences: z.array(z.string()),
|
|
||||||
startDate: z.string().optional()
|
|
||||||
}),
|
|
||||||
careerGoals: z.array(z.string()),
|
|
||||||
workPreferences: z.object({
|
|
||||||
workStyle: z.array(z.string()),
|
|
||||||
companySize: z.array(z.string()),
|
|
||||||
industries: z.array(z.string()),
|
|
||||||
roles: z.array(z.string())
|
|
||||||
}),
|
|
||||||
achievements: z.array(z.string())
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
TODO: complete
|
||||||
|
|
||||||
{
|
{
|
||||||
"body": [
|
"body": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -42,8 +42,8 @@
|
|||||||
"value": "https://mcp.arthurdanjou.fr"
|
"value": "https://mcp.arthurdanjou.fr"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Status Page",
|
"name": "Status Page",
|
||||||
"icon": "i-ph:activity-duotone",
|
"icon": "i-ph:fire-duotone",
|
||||||
"value": "https://go.arthurdanjou.fr/status"
|
"value": "https://go.arthurdanjou.fr/status"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
{
|
{
|
||||||
"name": "Spanish",
|
"name": "Spanish",
|
||||||
"level": "Intermediate",
|
"level": "Intermediate",
|
||||||
"proficiency": "B1"
|
"proficiency": "A2"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
1
content/mathematics.md
Normal file
1
content/mathematics.md
Normal file
@@ -0,0 +1 @@
|
|||||||
|
TODO: complete
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
TODO: complete and convert
|
||||||
|
|
||||||
{
|
{
|
||||||
"shortBio": "Software Engineer & Mathematics Student passionate about AI, Data Science, and Infrastructure. Building scalable solutions at the intersection of theory and practice.",
|
"shortBio": "Software Engineer & Mathematics Student passionate about AI, Data Science, and Infrastructure. Building scalable solutions at the intersection of theory and practice.",
|
||||||
"location": {
|
"location": {
|
||||||
124
server/api/content.config.ts
Normal file
124
server/api/content.config.ts
Normal file
@@ -0,0 +1,124 @@
|
|||||||
|
import { defineCollection, defineContentConfig, z } from '@nuxt/content'
|
||||||
|
|
||||||
|
export default defineContentConfig({
|
||||||
|
collections: {
|
||||||
|
projects: defineCollection({
|
||||||
|
type: 'page',
|
||||||
|
source: 'projects/*.md',
|
||||||
|
schema: z.object({
|
||||||
|
slug: z.string(),
|
||||||
|
title: z.string(),
|
||||||
|
description: z.string(),
|
||||||
|
publishedAt: z.string(),
|
||||||
|
readingTime: z.number().optional(),
|
||||||
|
tags: z.array(z.string()),
|
||||||
|
cover: z.string(),
|
||||||
|
favorite: z.boolean().optional()
|
||||||
|
})
|
||||||
|
}),
|
||||||
|
usesCategories: defineCollection({
|
||||||
|
type: 'data',
|
||||||
|
source: 'uses/categories/*.md',
|
||||||
|
schema: z.object({
|
||||||
|
slug: z.string(),
|
||||||
|
name: z.string()
|
||||||
|
})
|
||||||
|
}),
|
||||||
|
uses: defineCollection({
|
||||||
|
type: 'data',
|
||||||
|
source: 'uses/*.md',
|
||||||
|
schema: z.object({
|
||||||
|
name: z.string(),
|
||||||
|
description: z.string(),
|
||||||
|
category: z.string()
|
||||||
|
})
|
||||||
|
}),
|
||||||
|
skills: defineCollection({
|
||||||
|
type: 'page',
|
||||||
|
source: 'skills.json',
|
||||||
|
schema: z.object({
|
||||||
|
description: z.string(),
|
||||||
|
body: z.array(z.object({
|
||||||
|
id: z.string(),
|
||||||
|
name: z.string(),
|
||||||
|
items: z.array(z.object({
|
||||||
|
name: z.string(),
|
||||||
|
icon: z.string()
|
||||||
|
}))
|
||||||
|
}))
|
||||||
|
})
|
||||||
|
}),
|
||||||
|
experiences: defineCollection({
|
||||||
|
type: 'data',
|
||||||
|
source: 'experiences/*.md',
|
||||||
|
schema: z.object({
|
||||||
|
title: z.string(),
|
||||||
|
company: z.string(),
|
||||||
|
companyUrl: z.string().url().optional(),
|
||||||
|
startDate: z.string(),
|
||||||
|
endDate: z.string().optional(),
|
||||||
|
location: z.string(),
|
||||||
|
description: z.string(),
|
||||||
|
tags: z.array(z.string())
|
||||||
|
})
|
||||||
|
}),
|
||||||
|
education: defineCollection({
|
||||||
|
type: 'data',
|
||||||
|
source: 'education/*.md',
|
||||||
|
schema: z.object({
|
||||||
|
degree: z.string(),
|
||||||
|
institution: z.string(),
|
||||||
|
startDate: z.string(),
|
||||||
|
endDate: z.string().optional(),
|
||||||
|
location: z.string()
|
||||||
|
})
|
||||||
|
}),
|
||||||
|
contact: defineCollection({
|
||||||
|
type: 'page',
|
||||||
|
source: 'contact.json',
|
||||||
|
schema: z.object({
|
||||||
|
body: z.array(z.object({
|
||||||
|
name: z.string(),
|
||||||
|
icon: z.string().optional(),
|
||||||
|
value: z.string().url(),
|
||||||
|
username: z.string().optional()
|
||||||
|
}))
|
||||||
|
})
|
||||||
|
}),
|
||||||
|
hobbies: defineCollection({
|
||||||
|
type: 'page',
|
||||||
|
source: 'hobbies.md'
|
||||||
|
}),
|
||||||
|
languages: defineCollection({
|
||||||
|
type: 'page',
|
||||||
|
source: 'languages.json',
|
||||||
|
schema: z.object({
|
||||||
|
body: z.array(z.object({
|
||||||
|
name: z.string(),
|
||||||
|
level: z.string(),
|
||||||
|
proficiency: z.string()
|
||||||
|
}))
|
||||||
|
})
|
||||||
|
}),
|
||||||
|
certifications: defineCollection({
|
||||||
|
type: 'page',
|
||||||
|
source: 'certifications.json',
|
||||||
|
schema: z.object({
|
||||||
|
body: z.array(z.object({
|
||||||
|
name: z.string(),
|
||||||
|
issuer: z.string(),
|
||||||
|
date: z.string(),
|
||||||
|
url: z.string().url().optional()
|
||||||
|
}))
|
||||||
|
})
|
||||||
|
}),
|
||||||
|
mathematics: defineCollection({
|
||||||
|
type: 'page',
|
||||||
|
source: 'mathematics.md'
|
||||||
|
}),
|
||||||
|
profile: defineCollection({
|
||||||
|
type: 'page',
|
||||||
|
source: 'profile.md'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
10
server/api/mathematics.get.ts
Normal file
10
server/api/mathematics.get.ts
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
import { queryCollection } from '@nuxt/content/server'
|
||||||
|
|
||||||
|
export default defineCachedEventHandler(async (event) => {
|
||||||
|
return await queryCollection(event, 'mathematics')
|
||||||
|
.where('extension', '=', 'md')
|
||||||
|
.first()
|
||||||
|
}, {
|
||||||
|
name: 'mathematics-list',
|
||||||
|
maxAge: 3600 // 1 hour
|
||||||
|
})
|
||||||
@@ -2,7 +2,7 @@ import { queryCollection } from '@nuxt/content/server'
|
|||||||
|
|
||||||
export default defineCachedEventHandler(async (event) => {
|
export default defineCachedEventHandler(async (event) => {
|
||||||
return await queryCollection(event, 'profile')
|
return await queryCollection(event, 'profile')
|
||||||
.where('extension', '=', 'json')
|
.where('extension', '=', 'md')
|
||||||
.first()
|
.first()
|
||||||
}, {
|
}, {
|
||||||
name: 'profile-info',
|
name: 'profile-info',
|
||||||
|
|||||||
@@ -203,7 +203,7 @@ function createServer() {
|
|||||||
'artmcp-languages',
|
'artmcp-languages',
|
||||||
'resource://artmcp/languages',
|
'resource://artmcp/languages',
|
||||||
{
|
{
|
||||||
title: 'ArtMCP Languages',
|
title: 'Arthur Danjou - Languages',
|
||||||
description: 'Get Languages spoken by Arthur Danjou with proficiency levels'
|
description: 'Get Languages spoken by Arthur Danjou with proficiency levels'
|
||||||
},
|
},
|
||||||
async (uri) => {
|
async (uri) => {
|
||||||
@@ -222,7 +222,7 @@ function createServer() {
|
|||||||
'artmcp-certifications',
|
'artmcp-certifications',
|
||||||
'resource://artmcp/certifications',
|
'resource://artmcp/certifications',
|
||||||
{
|
{
|
||||||
title: 'ArtMCP Certifications',
|
title: 'Arthur Danjou - Certifications',
|
||||||
description: 'Get Certifications and achievements of Arthur Danjou'
|
description: 'Get Certifications and achievements of Arthur Danjou'
|
||||||
},
|
},
|
||||||
async (uri) => {
|
async (uri) => {
|
||||||
@@ -237,11 +237,30 @@ function createServer() {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
server.registerResource(
|
||||||
|
'artmcp-mathematics',
|
||||||
|
'resource://artmcp/mathematics',
|
||||||
|
{
|
||||||
|
title: 'Arthur Danjou - Mathematics',
|
||||||
|
description: 'Get information about Arthur Danjou\'s background and knowledge in mathematics, including areas of expertise and academic achievements'
|
||||||
|
},
|
||||||
|
async (uri) => {
|
||||||
|
const result = await $fetch('/api/mathematics')
|
||||||
|
return {
|
||||||
|
contents: [{
|
||||||
|
uri: uri.href,
|
||||||
|
mimeType: 'application/json',
|
||||||
|
text: JSON.stringify(result, null, 2)
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
server.registerResource(
|
server.registerResource(
|
||||||
'artmcp-profile',
|
'artmcp-profile',
|
||||||
'resource://artmcp/profile',
|
'resource://artmcp/profile',
|
||||||
{
|
{
|
||||||
title: 'ArtMCP Profile',
|
title: 'Arthur Danjou - Profile',
|
||||||
description: 'Get comprehensive profile information of Arthur Danjou including bio, location, availability, career goals, and work preferences'
|
description: 'Get comprehensive profile information of Arthur Danjou including bio, location, availability, career goals, and work preferences'
|
||||||
},
|
},
|
||||||
async (uri) => {
|
async (uri) => {
|
||||||
@@ -515,6 +534,25 @@ function createServer() {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
server.registerPrompt(
|
||||||
|
'artmcp-mathematics',
|
||||||
|
{
|
||||||
|
title: 'Get Mathematical Background Knowledge of Arthur Danjou',
|
||||||
|
description: 'Get information about Arthur Danjou\'s background and knowledge in mathematics, including areas of expertise and academic achievements'
|
||||||
|
},
|
||||||
|
async () => {
|
||||||
|
return {
|
||||||
|
messages: [{
|
||||||
|
role: 'user',
|
||||||
|
content: {
|
||||||
|
type: 'text',
|
||||||
|
text: `Provide me information about Arthur Danjou's background and knowledge in mathematics, including areas of expertise and academic achievements.`
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
server.registerPrompt(
|
server.registerPrompt(
|
||||||
'artmcp-profile',
|
'artmcp-profile',
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user