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.

revert: keep rkey for leaflet URLs, slug paths are unreliable

checked turso: only 20 leaflet docs have custom slugs, and most of
those slug URLs actually 404 on leaflet.pub (piffey, meri) while the
rkey URLs work fine. the ann.leaflet.pub case where rkey 404s and slug
works is the exception, not the rule. reverting to rkey-based URLs.

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

+4 -14
+3 -9
backend/src/server/search.zig
··· 115 115 } 116 116 // skip non-document-serving hosts (blento is a card portal, not a document platform) 117 117 const usable_base = base_path.len > 0 and !std.mem.startsWith(u8, base_path, "blento.app"); 118 - // leaflet + basePath → prefer path slug when available, fall back to rkey 119 - if (std.mem.eql(u8, platform, "leaflet") and usable_base) { 120 - if (path.len > 0) { 121 - const sep: []const u8 = if (path[0] == '/') "" else "/"; 122 - return std.fmt.allocPrint(alloc, "https://{s}{s}{s}", .{ base_path, sep, path }) catch ""; 123 - } 124 - if (rkey.len > 0) { 125 - return std.fmt.allocPrint(alloc, "https://{s}/{s}", .{ base_path, rkey }) catch ""; 126 - } 118 + // leaflet + basePath + rkey → https://{basePath}/{rkey} 119 + if (std.mem.eql(u8, platform, "leaflet") and usable_base and rkey.len > 0) { 120 + return std.fmt.allocPrint(alloc, "https://{s}/{s}", .{ base_path, rkey }) catch ""; 127 121 } 128 122 // basePath + path → https://{basePath}[/]{path} 129 123 if (usable_base and path.len > 0) {
+1 -5
site/atlas.js
··· 717 717 if (platform === 'whitewind' || collection.startsWith('com.whtwnd.')) return 'https://whtwnd.com/' + did + '/' + rkey; 718 718 // skip non-document-serving hosts (blento is a card portal, not a document platform) 719 719 var usableBase = basePath && !basePath.startsWith('blento.app'); 720 - // leaflet: prefer path slug when available, fall back to rkey 721 - if (platform === 'leaflet' && usableBase && path) { 722 - var sep = path.charAt(0) === '/' ? '' : '/'; 723 - return 'https://' + basePath + sep + path; 724 - } 720 + // leaflet uses rkey directly 725 721 if (platform === 'leaflet' && usableBase) return 'https://' + basePath + '/' + rkey; 726 722 // leaflet without basePath 727 723 if (platform === 'leaflet') return 'https://leaflet.pub/p/' + did + '/' + rkey;