mirror of
https://github.com/ArthurDanjou/artapi.git
synced 2026-01-14 20:49:27 +01:00
Merge socials into contact resource to eliminate duplication
Co-authored-by: ArthurDanjou <29738535+ArthurDanjou@users.noreply.github.com>
This commit is contained in:
@@ -80,7 +80,8 @@ export default defineContentConfig({
|
|||||||
body: z.array(z.object({
|
body: z.array(z.object({
|
||||||
name: z.string(),
|
name: z.string(),
|
||||||
icon: z.string().optional(),
|
icon: z.string().optional(),
|
||||||
value: z.string().url()
|
value: z.string().url(),
|
||||||
|
username: z.string().optional()
|
||||||
}))
|
}))
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
@@ -136,33 +137,6 @@ export default defineContentConfig({
|
|||||||
}),
|
}),
|
||||||
achievements: z.array(z.string())
|
achievements: z.array(z.string())
|
||||||
})
|
})
|
||||||
}),
|
|
||||||
socials: defineCollection({
|
|
||||||
type: 'page',
|
|
||||||
source: 'socials.json',
|
|
||||||
schema: z.object({
|
|
||||||
github: z.object({
|
|
||||||
username: z.string(),
|
|
||||||
url: z.string().url(),
|
|
||||||
stats: z.object({
|
|
||||||
note: z.string()
|
|
||||||
})
|
|
||||||
}),
|
|
||||||
linkedin: z.object({
|
|
||||||
url: z.string().url()
|
|
||||||
}),
|
|
||||||
twitter: z.object({
|
|
||||||
url: z.string().url()
|
|
||||||
}),
|
|
||||||
discord: z.object({
|
|
||||||
url: z.string().url()
|
|
||||||
}),
|
|
||||||
website: z.object({
|
|
||||||
personal: z.string().url(),
|
|
||||||
mcp: z.string().url(),
|
|
||||||
status: z.string().url()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -18,7 +18,8 @@
|
|||||||
{
|
{
|
||||||
"name": "GitHub",
|
"name": "GitHub",
|
||||||
"icon": "i-ph:github-logo-duotone",
|
"icon": "i-ph:github-logo-duotone",
|
||||||
"value": "https://go.arthurdanjou.fr/github"
|
"value": "https://go.arthurdanjou.fr/github",
|
||||||
|
"username": "ArthurDanjou"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Twitter",
|
"name": "Twitter",
|
||||||
@@ -29,6 +30,21 @@
|
|||||||
"name": "Discord",
|
"name": "Discord",
|
||||||
"icon": "i-ph:discord-logo-duotone",
|
"icon": "i-ph:discord-logo-duotone",
|
||||||
"value": "https://go.arthurdanjou.fr/discord"
|
"value": "https://go.arthurdanjou.fr/discord"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Personal Website",
|
||||||
|
"icon": "i-ph:globe-duotone",
|
||||||
|
"value": "https://arthurdanjou.fr"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "MCP Server",
|
||||||
|
"icon": "i-ph:globe-duotone",
|
||||||
|
"value": "https://mcp.arthurdanjou.fr"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Status Page",
|
||||||
|
"icon": "i-ph:activity-duotone",
|
||||||
|
"value": "https://go.arthurdanjou.fr/status"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
{
|
|
||||||
"github": {
|
|
||||||
"username": "ArthurDanjou",
|
|
||||||
"url": "https://go.arthurdanjou.fr/github",
|
|
||||||
"stats": {
|
|
||||||
"note": "Real-time stats available via GitHub API"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"linkedin": {
|
|
||||||
"url": "https://go.arthurdanjou.fr/linkedin"
|
|
||||||
},
|
|
||||||
"twitter": {
|
|
||||||
"url": "https://go.arthurdanjou.fr/twitter"
|
|
||||||
},
|
|
||||||
"discord": {
|
|
||||||
"url": "https://go.arthurdanjou.fr/discord"
|
|
||||||
},
|
|
||||||
"website": {
|
|
||||||
"personal": "https://arthurdanjou.fr",
|
|
||||||
"mcp": "https://mcp.arthurdanjou.fr",
|
|
||||||
"status": "https://go.arthurdanjou.fr/status"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
import { queryCollection } from '@nuxt/content/server'
|
|
||||||
|
|
||||||
export default defineCachedEventHandler(async (event) => {
|
|
||||||
return await queryCollection(event, 'socials')
|
|
||||||
.where('extension', '=', 'json')
|
|
||||||
.first()
|
|
||||||
}, {
|
|
||||||
name: 'socials-list',
|
|
||||||
maxAge: 3600 // 1 hour
|
|
||||||
})
|
|
||||||
@@ -147,7 +147,7 @@ function createServer() {
|
|||||||
'resource://artmcp/contact',
|
'resource://artmcp/contact',
|
||||||
{
|
{
|
||||||
title: 'ArtMCP Contact',
|
title: 'ArtMCP Contact',
|
||||||
description: 'Get Contact Information of Arthur Danjou'
|
description: 'Get Contact Information and Social Links of Arthur Danjou including email, LinkedIn, GitHub, Twitter, Discord, and websites'
|
||||||
},
|
},
|
||||||
async (uri) => {
|
async (uri) => {
|
||||||
const result = await $fetch('/api/contact')
|
const result = await $fetch('/api/contact')
|
||||||
@@ -256,25 +256,6 @@ function createServer() {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
server.registerResource(
|
|
||||||
'artmcp-socials',
|
|
||||||
'resource://artmcp/socials',
|
|
||||||
{
|
|
||||||
title: 'ArtMCP Social Links',
|
|
||||||
description: 'Get social media profiles and online presence of Arthur Danjou'
|
|
||||||
},
|
|
||||||
async (uri) => {
|
|
||||||
const result = await $fetch('/api/socials')
|
|
||||||
return {
|
|
||||||
contents: [{
|
|
||||||
uri: uri.href,
|
|
||||||
mimeType: 'application/json',
|
|
||||||
text: JSON.stringify(result, null, 2)
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
// Tools
|
// Tools
|
||||||
server.registerTool(
|
server.registerTool(
|
||||||
'get_resume_link',
|
'get_resume_link',
|
||||||
@@ -379,8 +360,8 @@ function createServer() {
|
|||||||
server.registerPrompt(
|
server.registerPrompt(
|
||||||
'artmcp-contact',
|
'artmcp-contact',
|
||||||
{
|
{
|
||||||
title: 'Get Contact Information of Arthur Danjou',
|
title: 'Get Contact Information and Social Links of Arthur Danjou',
|
||||||
description: 'Get Contact Information of Arthur Danjou'
|
description: 'Get Contact Information and Social Links of Arthur Danjou including email, social media, and websites'
|
||||||
},
|
},
|
||||||
async () => {
|
async () => {
|
||||||
return {
|
return {
|
||||||
@@ -388,7 +369,7 @@ function createServer() {
|
|||||||
role: 'user',
|
role: 'user',
|
||||||
content: {
|
content: {
|
||||||
type: 'text',
|
type: 'text',
|
||||||
text: `How can I contact Arthur Danjou?`
|
text: `How can I contact Arthur Danjou? Provide all contact methods and social links.`
|
||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
@@ -553,25 +534,6 @@ function createServer() {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
server.registerPrompt(
|
|
||||||
'artmcp-socials',
|
|
||||||
{
|
|
||||||
title: 'Get Social Media Links of Arthur Danjou',
|
|
||||||
description: 'Get social media profiles and online presence'
|
|
||||||
},
|
|
||||||
async () => {
|
|
||||||
return {
|
|
||||||
messages: [{
|
|
||||||
role: 'user',
|
|
||||||
content: {
|
|
||||||
type: 'text',
|
|
||||||
text: `What are Arthur Danjou's social media profiles and online presence?`
|
|
||||||
}
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
return server
|
return server
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user