|
| 1 | +--- |
| 2 | +# Jekyll front matter to enable Liquid templating |
| 3 | +--- |
| 4 | + |
| 5 | +<!doctype html> |
| 6 | +<html lang="en"> |
| 7 | + <head> |
| 8 | + <meta charset="utf-8" /> |
| 9 | + <meta name="viewport" content="width=device-width, initial-scale=1" /> |
| 10 | + <title>MCP TypeScript SDK - API Documentation</title> |
| 11 | + <meta http-equiv="refresh" content="1; url={{ site.data.latest_version }}/" /> |
| 12 | + <link rel="canonical" href="{{ site.data.latest_version }}/" /> |
| 13 | + <style> |
| 14 | + * { |
| 15 | + box-sizing: border-box; |
| 16 | + } |
| 17 | + body { |
| 18 | + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif; |
| 19 | + max-width: 800px; |
| 20 | + margin: 0 auto; |
| 21 | + padding: 2rem; |
| 22 | + line-height: 1.6; |
| 23 | + color: #333; |
| 24 | + } |
| 25 | + h1 { |
| 26 | + color: #1a1a1a; |
| 27 | + border-bottom: 2px solid #eee; |
| 28 | + padding-bottom: 0.5rem; |
| 29 | + } |
| 30 | + h2 { |
| 31 | + color: #444; |
| 32 | + margin-top: 2rem; |
| 33 | + } |
| 34 | + a { |
| 35 | + color: #0066cc; |
| 36 | + text-decoration: none; |
| 37 | + } |
| 38 | + a:hover { |
| 39 | + text-decoration: underline; |
| 40 | + } |
| 41 | + .redirect-notice { |
| 42 | + background: #f0f7ff; |
| 43 | + border: 1px solid #cce0ff; |
| 44 | + border-radius: 6px; |
| 45 | + padding: 1rem; |
| 46 | + margin-bottom: 2rem; |
| 47 | + } |
| 48 | + .versions-table { |
| 49 | + width: 100%; |
| 50 | + border-collapse: collapse; |
| 51 | + margin: 1rem 0; |
| 52 | + } |
| 53 | + .versions-table th, |
| 54 | + .versions-table td { |
| 55 | + text-align: left; |
| 56 | + padding: 0.75rem; |
| 57 | + border-bottom: 1px solid #eee; |
| 58 | + } |
| 59 | + .versions-table th { |
| 60 | + background: #f5f5f5; |
| 61 | + font-weight: 600; |
| 62 | + } |
| 63 | + .package-versions { |
| 64 | + display: none; |
| 65 | + background: #fafafa; |
| 66 | + border-radius: 6px; |
| 67 | + padding: 1rem; |
| 68 | + margin-top: 1rem; |
| 69 | + } |
| 70 | + .package-versions.loaded { |
| 71 | + display: block; |
| 72 | + } |
| 73 | + .package-list { |
| 74 | + list-style: none; |
| 75 | + padding: 0; |
| 76 | + margin: 0; |
| 77 | + } |
| 78 | + .package-list li { |
| 79 | + padding: 0.25rem 0; |
| 80 | + font-family: monospace; |
| 81 | + font-size: 0.9rem; |
| 82 | + } |
| 83 | + .package-name { |
| 84 | + color: #666; |
| 85 | + } |
| 86 | + .package-version { |
| 87 | + color: #0066cc; |
| 88 | + font-weight: 500; |
| 89 | + } |
| 90 | + @media (prefers-color-scheme: dark) { |
| 91 | + body { |
| 92 | + background: #1a1a1a; |
| 93 | + color: #e0e0e0; |
| 94 | + } |
| 95 | + h1 { |
| 96 | + color: #fff; |
| 97 | + border-bottom-color: #333; |
| 98 | + } |
| 99 | + h2 { |
| 100 | + color: #ccc; |
| 101 | + } |
| 102 | + a { |
| 103 | + color: #66b3ff; |
| 104 | + } |
| 105 | + .redirect-notice { |
| 106 | + background: #1a2a3a; |
| 107 | + border-color: #2a4a6a; |
| 108 | + } |
| 109 | + .versions-table th { |
| 110 | + background: #2a2a2a; |
| 111 | + } |
| 112 | + .versions-table td, |
| 113 | + .versions-table th { |
| 114 | + border-bottom-color: #333; |
| 115 | + } |
| 116 | + .package-versions { |
| 117 | + background: #2a2a2a; |
| 118 | + } |
| 119 | + .package-name { |
| 120 | + color: #999; |
| 121 | + } |
| 122 | + } |
| 123 | + </style> |
| 124 | + </head> |
| 125 | + <body> |
| 126 | + <h1>MCP TypeScript SDK</h1> |
| 127 | + |
| 128 | + <div class="redirect-notice"> |
| 129 | + <p>Redirecting to <a href="{{ site.data.latest_version }}/">latest documentation ({{ site.data.latest_version }})</a>...</p> |
| 130 | + </div> |
| 131 | + |
| 132 | + <h2>Package Versions</h2> |
| 133 | + <div id="package-versions" class="package-versions"> |
| 134 | + <p>Loading package versions...</p> |
| 135 | + </div> |
| 136 | + |
| 137 | + <h2>All Documentation Versions</h2> |
| 138 | + <p>Select a version to view its API documentation:</p> |
| 139 | + <ul id="versions-list"> |
| 140 | + <li><a href="{{ site.data.latest_version }}/">{{ site.data.latest_version }}</a> (latest)</li> |
| 141 | + </ul> |
| 142 | + |
| 143 | + <script> |
| 144 | + // Redirect to latest version |
| 145 | + setTimeout(function () { |
| 146 | + window.location.href = '{{ site.data.latest_version }}/'; |
| 147 | + }, 1000); |
| 148 | + |
| 149 | + // Load and display package versions from versions.json |
| 150 | + fetch('{{ site.data.latest_version }}/versions.json') |
| 151 | + .then(function (response) { |
| 152 | + if (!response.ok) throw new Error('versions.json not found'); |
| 153 | + return response.json(); |
| 154 | + }) |
| 155 | + .then(function (data) { |
| 156 | + var container = document.getElementById('package-versions'); |
| 157 | + var html = '<p>Packages included in the latest documentation:</p><ul class="package-list">'; |
| 158 | + |
| 159 | + for (var pkg in data.packages) { |
| 160 | + html += |
| 161 | + '<li><span class="package-name">' + |
| 162 | + pkg + |
| 163 | + '</span>: <span class="package-version">' + |
| 164 | + data.packages[pkg] + |
| 165 | + '</span></li>'; |
| 166 | + } |
| 167 | + |
| 168 | + html += '</ul>'; |
| 169 | + html += |
| 170 | + '<p style="font-size: 0.85rem; color: #666; margin-top: 1rem;">Generated from tag: ' + |
| 171 | + data.generated_from_tag + |
| 172 | + '</p>'; |
| 173 | + |
| 174 | + container.innerHTML = html; |
| 175 | + container.classList.add('loaded'); |
| 176 | + }) |
| 177 | + .catch(function (err) { |
| 178 | + // versions.json may not exist for older docs |
| 179 | + document.getElementById('package-versions').style.display = 'none'; |
| 180 | + }); |
| 181 | + </script> |
| 182 | + </body> |
| 183 | +</html> |
0 commit comments