search for standard sites pub-search.waow.tech
search zig blog atproto
11
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: platform-specific URL patterns with pdsls.dev fallback

- Leaflet: basePath + rkey
- pckt: basePath + path (slug-based URLs)
- Unknown: pdsls.dev fallback for universal AT Protocol record viewing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

zzstoatzz ef4c3975 087e595a

+18 -10
+18 -10
site/index.html
··· 512 512 if (entityType === 'publication') { 513 513 return doc.basePath ? `https://${doc.basePath}` : null; 514 514 } 515 - // documents: prefer basePath + path (from record) over rkey 516 - if (doc.basePath && doc.path) { 517 - // path already includes leading slash (e.g., "/001") 515 + 516 + // Platform-specific URL patterns: 517 + // 1. Leaflet: basePath + rkey (e.g., https://dad.leaflet.pub/3mburumcnbs2m) 518 + if (platform === 'leaflet' && doc.basePath && doc.rkey) { 519 + return `https://${doc.basePath}/${doc.rkey}`; 520 + } 521 + 522 + // 2. pckt: basePath + path (e.g., https://devlog.pckt.blog/some-slug-abc123) 523 + if (platform === 'pckt' && doc.basePath && doc.path) { 518 524 return `https://${doc.basePath}${doc.path}`; 519 525 } 520 - // fallback to basePath + rkey (legacy pattern) 521 - if (doc.basePath && doc.rkey) { 522 - return `https://${doc.basePath}/${doc.rkey}`; 526 + 527 + // 3. Other platforms with path: basePath + path 528 + if (doc.basePath && doc.path) { 529 + return `https://${doc.basePath}${doc.path}`; 523 530 } 524 - // fallback to platform-specific URL pattern 525 - const config = PLATFORM_CONFIG[platform]; 526 - if (config && config.docUrl && doc.did && doc.rkey) { 527 - return config.docUrl(doc.did, doc.rkey); 531 + 532 + // 4. Fallback: pdsls.dev universal viewer (always works for any AT Protocol record) 533 + if (doc.uri) { 534 + return `https://pdsls.dev/${doc.uri}`; 528 535 } 536 + 529 537 return null; 530 538 } 531 539