From e310cf2ca8fb527f46b6cee4b4674e89b1f5c6a5 Mon Sep 17 00:00:00 2001 From: David Vargas Date: Tue, 27 Sep 2022 12:34:43 -0400 Subject: [PATCH] Correcting linked ref text --- lambdas/deploy.ts | 10 ---------- src/components/StaticSiteDashboard.tsx | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/lambdas/deploy.ts b/lambdas/deploy.ts index 196d198..8e51f8c 100644 --- a/lambdas/deploy.ts +++ b/lambdas/deploy.ts @@ -845,12 +845,6 @@ export const renderHtmlFromPage = ({ () => converter({ content }), (e) => `
Failed to render page: ${p}
${e.message}
` ); - console.log( - "REFERENCES FOR", - p, - "INCLUDE", - JSON.stringify(references, null, 4) - ); const preHydratedHtml = config.template .replace( /\${PAGE_CONTENT}/g, @@ -955,7 +949,6 @@ export const processSiteData = async ({ `resolving ${pageNames.length} pages ${new Date().toLocaleTimeString()}` ); info(`Here are some: ${pageNames.slice(0, 5)}`); - console.log("References", references); const blockInfoCache: Parameters< typeof renderHtmlFromPage >[0]["blockInfoCache"] = {}; @@ -967,7 +960,6 @@ export const processSiteData = async ({ }; content.forEach(forEach); }); - console.log("blockInfoCache", blockInfoCache); const linkedReferencesCache: Parameters< typeof renderHtmlFromPage >[0]["linkedReferencesCache"] = {}; @@ -976,7 +968,6 @@ export const processSiteData = async ({ .forEach((node) => { blockInfoCache[node.refUid] = blockInfoCache[node.refUid] || node.refText; }); - console.log("blockInfoCache", blockInfoCache); references .filter(({ refTitle }) => !!refTitle) .forEach((node) => { @@ -992,7 +983,6 @@ export const processSiteData = async ({ }, ]; }); - console.log("linkedReferencesCache", linkedReferencesCache); const parseInline = await getParseInline(); pageNames.map((p) => { diff --git a/src/components/StaticSiteDashboard.tsx b/src/components/StaticSiteDashboard.tsx index c9e3315..15855c3 100644 --- a/src/components/StaticSiteDashboard.tsx +++ b/src/components/StaticSiteDashboard.tsx @@ -1361,7 +1361,7 @@ export const getDeployBody = (pageUid: string) => { node: formatRoamNodes([ { ...ref, text: ref?.title || ref?.text || "" }, ])[0], - refText: node?.text, + refText: node?.string, refTitle: node?.title, refUid: node?.uid, })