a tool for shared writing and social publishing

fix pub favicons

+22 -8
+7
app/lish/[did]/[publication]/[rkey]/page.tsx
··· 25 25 26 26 return { 27 27 icons: { 28 + icon: { 29 + 30 + url: 31 + process.env.NODE_ENV === "development" 32 + ? `/lish/${did}/${params.publication}/icon` 33 + : "/icon", 34 + , sizes: "32x32", type: "image/png" }, 28 35 other: { 29 36 rel: "alternate", 30 37 url: document.uri,
+7 -8
app/lish/[did]/[publication]/icon.ts app/lish/[did]/[publication]/icon/route.ts
··· 8 8 9 9 let idResolver = new IdResolver(); 10 10 11 - export const size = { 12 - width: 32, 13 - height: 32, 14 - }; 11 + export const dynamic = "force-dynamic"; 15 12 16 - export const contentType = "image/png"; 17 - export default async function Icon(props: { 18 - params: Promise<{ did: string; publication: string }>; 19 - }) { 13 + export async function GET( 14 + request: NextRequest, 15 + props: { params: Promise<{ did: string; publication: string }> } 16 + ) { 17 + console.log("are we getting here?"); 20 18 const params = await props.params; 21 19 try { 22 20 let did = decodeURIComponent(params.did); ··· 63 61 }, 64 62 }); 65 63 } catch (e) { 64 + console.log(e); 66 65 return redirect("/icon.png"); 67 66 } 68 67 }
+8
app/lish/[did]/[publication]/layout.tsx
··· 47 47 title: pubRecord?.name || "Untitled Publication", 48 48 description: pubRecord?.description || "", 49 49 icons: { 50 + icon: { 51 + url: 52 + process.env.NODE_ENV === "development" 53 + ? `/lish/${did}/${publication_name}/icon` 54 + : "/icon", 55 + sizes: "32x32", 56 + type: "image/png", 57 + }, 50 58 other: { 51 59 rel: "alternate", 52 60 url: publication.uri,