---
import Layout from '../layouts/Layout.astro';
import { readFileSync } from 'fs';
import { marked } from 'marked';
import { join } from 'path';
const tutorialPath = join(process.cwd(), '../TUTORIAL.md');
const tutorialMarkdown = readFileSync(tutorialPath, 'utf-8');
const tutorialHtml = marked(tutorialMarkdown);
---
<Layout title="Tutorial - Documentation Search Enhanced" description="Complete guide to using the documentation-search-enhanced MCP server for documentation search, security scanning, and project generation.">
<div class="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
<article class="prose prose-slate lg:prose-lg max-w-none" set:html={tutorialHtml} />
</div>
</Layout>
<style is:global>
.prose {
color: #1e293b;
}
.prose h1 {
font-size: 2.5rem;
font-weight: 800;
margin-top: 0;
margin-bottom: 1.5rem;
color: #0f172a;
}
.prose h2 {
font-size: 2rem;
font-weight: 700;
margin-top: 3rem;
margin-bottom: 1rem;
padding-bottom: 0.5rem;
border-bottom: 2px solid #e2e8f0;
color: #1e293b;
}
.prose h3 {
font-size: 1.5rem;
font-weight: 600;
margin-top: 2rem;
margin-bottom: 1rem;
color: #334155;
}
.prose h4 {
font-size: 1.25rem;
font-weight: 600;
margin-top: 1.5rem;
margin-bottom: 0.75rem;
color: #475569;
}
.prose p {
margin-bottom: 1.25rem;
line-height: 1.75;
}
.prose ul, .prose ol {
margin-left: 1.5rem;
margin-bottom: 1.25rem;
}
.prose li {
margin-bottom: 0.5rem;
line-height: 1.75;
}
.prose code {
background-color: #f1f5f9;
padding: 0.2rem 0.4rem;
border-radius: 0.25rem;
font-size: 0.875em;
color: #dc2626;
font-weight: 600;
}
.prose pre {
background-color: #1e293b;
color: #e2e8f0;
padding: 1.25rem;
border-radius: 0.5rem;
overflow-x: auto;
margin-bottom: 1.5rem;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.prose pre code {
background-color: transparent;
color: #e2e8f0;
padding: 0;
font-weight: 400;
}
.prose a {
color: #2563eb;
text-decoration: underline;
font-weight: 500;
}
.prose a:hover {
color: #1d4ed8;
}
.prose blockquote {
border-left: 4px solid #3b82f6;
padding-left: 1rem;
margin-left: 0;
font-style: italic;
color: #64748b;
background-color: #f8fafc;
padding: 1rem;
border-radius: 0.25rem;
}
.prose table {
width: 100%;
margin-bottom: 1.5rem;
border-collapse: collapse;
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}
.prose th {
background-color: #f1f5f9;
padding: 0.75rem 1rem;
text-align: left;
font-weight: 600;
border: 1px solid #e2e8f0;
color: #0f172a;
}
.prose td {
padding: 0.75rem 1rem;
border: 1px solid #e2e8f0;
}
.prose hr {
border: none;
border-top: 1px solid #e2e8f0;
margin: 3rem 0;
}
.prose strong {
color: #0f172a;
font-weight: 600;
}
</style>