From aacada21978ac5e967ff0bacdbd1adfc2b27db46 Mon Sep 17 00:00:00 2001 From: colinislit Date: Tue, 2 Dec 2025 13:37:45 +0100 Subject: [PATCH] chat suggestions, SEo integration, and more --- .gitignore | 6 +- .../documentatie/[category]/page.tsx | 72 +++ app/api/docs/chat/route.ts | 29 +- app/layout.tsx | 34 ++ app/sitemap.ts | 50 +- components/docs-chat/chat-suggestions.tsx | 57 ++- components/docs-chat/docs-chat-widget.tsx | 50 +- components/docs-chat/use-docs-chat.ts | 27 +- .../bouwplan-ai-client-assistent-v1.md | 341 +++++++++++++ .../bouwplan-ai-docs-assistent-v1.md | 321 ------------ .../fo-ai-client-assistent-v1.md | 367 +++++++++++++ .../ai-integratie/fo-ai-docs-assistent-v1.md | 386 -------------- .../prd-ai-client-assistent-v1.md | 205 ++++++++ .../to-ai-client-assistent-v1.md | 483 ++++++++++++++++++ lib/docs/client-context-loader.ts | 263 ++++++++++ lib/docs/client-prompt-builder.ts | 170 ++++++ lib/docs/question-type-detector.ts | 154 ++++++ 17 files changed, 2276 insertions(+), 739 deletions(-) create mode 100644 docs/specs/ai-integratie/bouwplan-ai-client-assistent-v1.md delete mode 100644 docs/specs/ai-integratie/bouwplan-ai-docs-assistent-v1.md create mode 100644 docs/specs/ai-integratie/fo-ai-client-assistent-v1.md delete mode 100644 docs/specs/ai-integratie/fo-ai-docs-assistent-v1.md create mode 100644 docs/specs/ai-integratie/prd-ai-client-assistent-v1.md create mode 100644 docs/specs/ai-integratie/to-ai-client-assistent-v1.md create mode 100644 lib/docs/client-context-loader.ts create mode 100644 lib/docs/client-prompt-builder.ts create mode 100644 lib/docs/question-type-detector.ts diff --git a/.gitignore b/.gitignore index cfb4871..263015d 100644 --- a/.gitignore +++ b/.gitignore @@ -45,4 +45,8 @@ next-env.d.ts .claude .mcp.json -/archive/* \ No newline at end of file +# documentation +/archive/* +/docs/archive/* +/docs/specs/archive/* +/docs/reports/archive/* \ No newline at end of file diff --git a/app/(marketing)/documentatie/[category]/page.tsx b/app/(marketing)/documentatie/[category]/page.tsx index e678b82..af80399 100644 --- a/app/(marketing)/documentatie/[category]/page.tsx +++ b/app/(marketing)/documentatie/[category]/page.tsx @@ -41,6 +41,72 @@ export async function generateMetadata({ params }: ReleasePageProps) { } } +function ArticleJsonLd({ + title, + description, + releaseDate, + slug, +}: { + title: string + description: string + releaseDate: string + slug: string +}) { + const siteUrl = process.env.NEXT_PUBLIC_APP_URL || 'https://aispeedrun.vercel.app' + + const jsonLd = { + '@context': 'https://schema.org', + '@graph': [ + { + '@type': 'Article', + '@id': `${siteUrl}/documentatie/${slug}#article`, + headline: title, + description: description, + datePublished: releaseDate, + dateModified: releaseDate, + author: { + '@type': 'Person', + name: 'Colin van der Heijden', + url: 'https://ikbenlit.nl', + }, + publisher: { '@id': `${siteUrl}/#organization` }, + mainEntityOfPage: `${siteUrl}/documentatie/${slug}`, + inLanguage: 'nl-NL', + }, + { + '@type': 'BreadcrumbList', + '@id': `${siteUrl}/documentatie/${slug}#breadcrumb`, + itemListElement: [ + { + '@type': 'ListItem', + position: 1, + name: 'Home', + item: siteUrl, + }, + { + '@type': 'ListItem', + position: 2, + name: 'Documentatie', + item: `${siteUrl}/documentatie`, + }, + { + '@type': 'ListItem', + position: 3, + name: title, + }, + ], + }, + ], + } + + return ( +