···183183/**
184184 * Resolve a relative URL to an absolute URL.
185185 * If repository info is available, resolve to provider's raw file URLs.
186186- * Otherwise, fall back to jsdelivr CDN.
186186+ * For markdown files (.md), use blob URLs so they render properly.
187187+ * Otherwise, fall back to jsdelivr CDN (except for .md files which are left unchanged).
187188 */
188189function resolveUrl(url: string, packageName: string, repoInfo?: RepositoryInfo): string {
189190 if (!url) return url
···207208 // for non-HTTP protocols (javascript:, data:, etc.), don't return, treat as relative
208209 }
209210210210- // Use provider's raw URL base when repository info is available
211211+ // Check if this is a markdown file link
212212+ const isMarkdownFile = /\.md$/i.test(url.split('?')[0]?.split('#')[0] ?? '')
213213+214214+ // Use provider's URL base when repository info is available
211215 // This handles assets that exist in the repo but not in the npm tarball
212216 if (repoInfo?.rawBaseUrl) {
213217 // Normalize the relative path (remove leading ./)
···232236 }
233237 }
234238235235- return `${repoInfo.rawBaseUrl}/${relativePath}`
239239+ // For markdown files, use blob URL so they render on the provider's site
240240+ // For other files, use raw URL for direct access
241241+ const baseUrl = isMarkdownFile ? repoInfo.blobBaseUrl : repoInfo.rawBaseUrl
242242+ return `${baseUrl}/${relativePath}`
243243+ }
244244+245245+ // For markdown files without repo info, leave unchanged (like npm does)
246246+ // This avoids 404s from jsdelivr which doesn't render markdown
247247+ if (isMarkdownFile) {
248248+ return url
236249 }
237250238251 // Fallback: relative URLs → jsdelivr CDN (may 404 if asset not in npm tarball)