183 lines
6 KiB
HTML
183 lines
6 KiB
HTML
---
|
|
# Jekyll front matter to enable Liquid templating
|
|
---
|
|
|
|
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<title>MCP TypeScript SDK - API Documentation</title>
|
|
<meta http-equiv="refresh" content="1; url={{ site.data.latest_version }}/" />
|
|
<link rel="canonical" href="{{ site.data.latest_version }}/" />
|
|
<style>
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
|
|
max-width: 800px;
|
|
margin: 0 auto;
|
|
padding: 2rem;
|
|
line-height: 1.6;
|
|
color: #333;
|
|
}
|
|
h1 {
|
|
color: #1a1a1a;
|
|
border-bottom: 2px solid #eee;
|
|
padding-bottom: 0.5rem;
|
|
}
|
|
h2 {
|
|
color: #444;
|
|
margin-top: 2rem;
|
|
}
|
|
a {
|
|
color: #0066cc;
|
|
text-decoration: none;
|
|
}
|
|
a:hover {
|
|
text-decoration: underline;
|
|
}
|
|
.redirect-notice {
|
|
background: #f0f7ff;
|
|
border: 1px solid #cce0ff;
|
|
border-radius: 6px;
|
|
padding: 1rem;
|
|
margin-bottom: 2rem;
|
|
}
|
|
.versions-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
margin: 1rem 0;
|
|
}
|
|
.versions-table th,
|
|
.versions-table td {
|
|
text-align: left;
|
|
padding: 0.75rem;
|
|
border-bottom: 1px solid #eee;
|
|
}
|
|
.versions-table th {
|
|
background: #f5f5f5;
|
|
font-weight: 600;
|
|
}
|
|
.package-versions {
|
|
display: none;
|
|
background: #fafafa;
|
|
border-radius: 6px;
|
|
padding: 1rem;
|
|
margin-top: 1rem;
|
|
}
|
|
.package-versions.loaded {
|
|
display: block;
|
|
}
|
|
.package-list {
|
|
list-style: none;
|
|
padding: 0;
|
|
margin: 0;
|
|
}
|
|
.package-list li {
|
|
padding: 0.25rem 0;
|
|
font-family: monospace;
|
|
font-size: 0.9rem;
|
|
}
|
|
.package-name {
|
|
color: #666;
|
|
}
|
|
.package-version {
|
|
color: #0066cc;
|
|
font-weight: 500;
|
|
}
|
|
@media (prefers-color-scheme: dark) {
|
|
body {
|
|
background: #1a1a1a;
|
|
color: #e0e0e0;
|
|
}
|
|
h1 {
|
|
color: #fff;
|
|
border-bottom-color: #333;
|
|
}
|
|
h2 {
|
|
color: #ccc;
|
|
}
|
|
a {
|
|
color: #66b3ff;
|
|
}
|
|
.redirect-notice {
|
|
background: #1a2a3a;
|
|
border-color: #2a4a6a;
|
|
}
|
|
.versions-table th {
|
|
background: #2a2a2a;
|
|
}
|
|
.versions-table td,
|
|
.versions-table th {
|
|
border-bottom-color: #333;
|
|
}
|
|
.package-versions {
|
|
background: #2a2a2a;
|
|
}
|
|
.package-name {
|
|
color: #999;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h1>MCP TypeScript SDK</h1>
|
|
|
|
<div class="redirect-notice">
|
|
<p>Redirecting to <a href="{{ site.data.latest_version }}/">latest documentation ({{ site.data.latest_version }})</a>...</p>
|
|
</div>
|
|
|
|
<h2>Package Versions</h2>
|
|
<div id="package-versions" class="package-versions">
|
|
<p>Loading package versions...</p>
|
|
</div>
|
|
|
|
<h2>All Documentation Versions</h2>
|
|
<p>Select a version to view its API documentation:</p>
|
|
<ul id="versions-list">
|
|
<li><a href="{{ site.data.latest_version }}/">{{ site.data.latest_version }}</a> (latest)</li>
|
|
</ul>
|
|
|
|
<script>
|
|
// Redirect to latest version
|
|
setTimeout(function () {
|
|
window.location.href = '{{ site.data.latest_version }}/';
|
|
}, 1000);
|
|
|
|
// Load and display package versions from versions.json
|
|
fetch('{{ site.data.latest_version }}/versions.json')
|
|
.then(function (response) {
|
|
if (!response.ok) throw new Error('versions.json not found');
|
|
return response.json();
|
|
})
|
|
.then(function (data) {
|
|
var container = document.getElementById('package-versions');
|
|
var html = '<p>Packages included in the latest documentation:</p><ul class="package-list">';
|
|
|
|
for (var pkg in data.packages) {
|
|
html +=
|
|
'<li><span class="package-name">' +
|
|
pkg +
|
|
'</span>: <span class="package-version">' +
|
|
data.packages[pkg] +
|
|
'</span></li>';
|
|
}
|
|
|
|
html += '</ul>';
|
|
html +=
|
|
'<p style="font-size: 0.85rem; color: #666; margin-top: 1rem;">Generated from tag: ' +
|
|
data.generated_from_tag +
|
|
'</p>';
|
|
|
|
container.innerHTML = html;
|
|
container.classList.add('loaded');
|
|
})
|
|
.catch(function (err) {
|
|
// versions.json may not exist for older docs
|
|
document.getElementById('package-versions').style.display = 'none';
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|