a tool for shared writing and social publishing
0
fork

Configure Feed

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

fix getting page titles in page metadata

+5 -3
+5 -3
app/[leaflet_id]/page.tsx
··· 74 74 }); 75 75 let initialFacts = (data as unknown as Fact<keyof typeof Attributes>[]) || []; 76 76 let scan = scanIndexLocal(initialFacts); 77 - let pageType = scan.eav(rootEntity, "page/type")[0]?.data.value || "doc"; 77 + let firstPage = 78 + scan.eav(rootEntity, "root/page")[0]?.data.value || rootEntity; 79 + let pageType = scan.eav(firstPage, "page/type")[0]?.data.value || "doc"; 78 80 let firstBlock, secondBlock; 79 81 if (pageType === "canvas") { 80 82 [firstBlock, secondBlock] = scan 81 - .eav(rootEntity, "canvas/block") 83 + .eav(firstPage, "canvas/block") 82 84 .map((b) => { 83 85 let type = scan.eav(b.data.value, "block/type"); 84 86 if (!type[0]) return null; ··· 97 99 }); 98 100 } else { 99 101 [firstBlock, secondBlock] = scan 100 - .eav(rootEntity, "card/block") 102 + .eav(firstPage, "card/block") 101 103 .map((b) => { 102 104 let type = scan.eav(b.data.value, "block/type"); 103 105 return {