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.

feat: add offprint.app platform support

- schema.zig: migration to reclassify existing offprint docs
- indexer.zig: detect offprint from basePath at insert time
- site/index.html: add offprint to platform filter dropdown

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

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

zzstoatzz f08eb952 50f2ae40

+25 -3
+7
backend/src/db/schema.zig
··· 160 160 \\AND publication_uri IN (SELECT uri FROM publications WHERE base_path LIKE '%leaflet.pub%') 161 161 , &.{}) catch {}; 162 162 163 + // offprint uses site.standard.* lexicon, detect by basePath 164 + client.exec( 165 + \\UPDATE documents SET platform = 'offprint' 166 + \\WHERE platform IN ('standardsite', 'unknown') 167 + \\AND publication_uri IN (SELECT uri FROM publications WHERE base_path LIKE '%offprint.app%' OR base_path LIKE '%offprint.test%') 168 + , &.{}) catch {}; 169 + 163 170 // URL path field for documents (e.g., "/001" for zat.dev) 164 171 // used to build full URL: publication.url + document.path 165 172 client.exec("ALTER TABLE documents ADD COLUMN path TEXT", &.{}) catch {};
+15 -1
backend/src/indexer.zig
··· 57 57 } else |_| {} 58 58 } 59 59 60 + // detect platform from base_path (overrides collection-based detection for site.standard.*) 61 + var actual_platform = platform; 62 + if (std.mem.eql(u8, platform, "standardsite") or std.mem.eql(u8, platform, "unknown")) { 63 + if (std.mem.indexOf(u8, base_path, "offprint.app") != null or 64 + std.mem.indexOf(u8, base_path, "offprint.test") != null) 65 + { 66 + actual_platform = "offprint"; 67 + } else if (std.mem.indexOf(u8, base_path, "pckt.blog") != null) { 68 + actual_platform = "pckt"; 69 + } else if (std.mem.indexOf(u8, base_path, "leaflet.pub") != null) { 70 + actual_platform = "leaflet"; 71 + } 72 + } 73 + 60 74 try c.exec( 61 75 "INSERT OR REPLACE INTO documents (uri, did, rkey, title, content, created_at, publication_uri, platform, source_collection, path, base_path, has_publication) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", 62 - &.{ uri, did, rkey, title, content, created_at orelse "", pub_uri, platform, source_collection, path orelse "", base_path, has_pub }, 76 + &.{ uri, did, rkey, title, content, created_at orelse "", pub_uri, actual_platform, source_collection, path orelse "", base_path, has_pub }, 63 77 ); 64 78 65 79 // update FTS index
+3 -2
site/index.html
··· 504 504 <div id="results" class="results"> 505 505 <div class="empty-state"> 506 506 <p>search atproto publishing platforms</p> 507 - <p style="font-size:11px;margin-top:0.5rem"><a href="https://leaflet.pub" target="_blank">leaflet</a> 路 <a href="https://pckt.blog" target="_blank">pckt</a> 路 <a href="https://standard.site" target="_blank">standard.site</a></p> 507 + <p style="font-size:11px;margin-top:0.5rem"><a href="https://leaflet.pub" target="_blank">leaflet</a> 路 <a href="https://pckt.blog" target="_blank">pckt</a> 路 <a href="https://offprint.app" target="_blank">offprint</a></p> 508 508 </div> 509 509 </div> 510 510 ··· 787 787 const platforms = [ 788 788 { id: 'leaflet', label: 'leaflet' }, 789 789 { id: 'pckt', label: 'pckt' }, 790 + { id: 'offprint', label: 'offprint' }, 790 791 ]; 791 792 const html = platforms.map(p => ` 792 793 <span class="platform-option${currentPlatform === p.id ? ' active' : ''}" onclick="setPlatform('${p.id}')">${p.label}</span> ··· 871 872 resultsDiv.innerHTML = ` 872 873 <div class="empty-state"> 873 874 <p>search atproto publishing platforms</p> 874 - <p style="font-size:11px;margin-top:0.5rem"><a href="https://leaflet.pub" target="_blank">leaflet</a> 路 <a href="https://pckt.blog" target="_blank">pckt</a> 路 <a href="https://standard.site" target="_blank">standard.site</a></p> 875 + <p style="font-size:11px;margin-top:0.5rem"><a href="https://leaflet.pub" target="_blank">leaflet</a> 路 <a href="https://pckt.blog" target="_blank">pckt</a> 路 <a href="https://offprint.app" target="_blank">offprint</a></p> 875 876 </div> 876 877 `; 877 878 }