diff --git a/apps/portal/src/app/api/search/extraction/index.ts b/apps/portal/src/app/api/search/extraction/index.ts index a3a131e8e78..5692ba42dd7 100644 --- a/apps/portal/src/app/api/search/extraction/index.ts +++ b/apps/portal/src/app/api/search/extraction/index.ts @@ -155,6 +155,8 @@ function extractPageLLMContent( const htmlToMarkdown = new NodeHtmlMarkdown({ keepDataImages: false, + ignore: ["button"], + maxConsecutiveNewlines: 2, }); let linksContent = ""; @@ -167,10 +169,7 @@ function extractPageLLMContent( let description = ""; for (const p of paragraphs) { // skip noindex or no-llm paragraphs - if ( - p.getAttribute("data-noindex") === "true" || - p.getAttribute("data-no-llm") === "true" - ) { + if (p.closest("[data-noindex]") || p.closest("[data-no-llm]")) { continue; } @@ -180,7 +179,7 @@ function extractPageLLMContent( } } - linksContent += `* [${pageTitle}](${pageUrl}): ${description}`; + linksContent += `* [${pageTitle}](${pageUrl}): ${description || `Reference for ${pageTitle}`}`; // Remove noindex and no-llm elements const contentElements = main.querySelectorAll("*"); @@ -204,12 +203,18 @@ function extractPageLLMContent( // prefix all the relative links with the `https://portal.thirdweb.com` const links = main.querySelectorAll("a"); for (const link of links) { - const [path, hash] = link.getAttribute("href")?.split("#") || []; - if (path?.startsWith("/")) { - link.setAttribute( - "href", - `https://portal.thirdweb.com${path}${hash ? `#${hash}` : ""}`, - ); + const href = link.getAttribute("href"); + if (href?.startsWith("/")) { + link.setAttribute("href", `https://portal.thirdweb.com${href}`); + } + } + + // prefix all relative image links with the `https://portal.thirdweb.com` + const images = main.querySelectorAll("img"); + for (const image of images) { + const src = image.getAttribute("src"); + if (src?.startsWith("/")) { + image.setAttribute("src", `https://portal.thirdweb.com${src}`); } } diff --git a/apps/portal/src/app/connect/account-abstraction/batching-transactions/page.mdx b/apps/portal/src/app/connect/account-abstraction/batching-transactions/page.mdx index be33a4b1f79..55a89160822 100644 --- a/apps/portal/src/app/connect/account-abstraction/batching-transactions/page.mdx +++ b/apps/portal/src/app/connect/account-abstraction/batching-transactions/page.mdx @@ -12,7 +12,7 @@ export const metadata = createMetadata({ description: "How to batch transactions with smart accounts", }); -Batching transactions allows sending multiple transactions in a single user operation. This can be useful to save on fees, reduce number of user confimations or to ensure that multiple transactions are executed atomically. +Batching transactions allows sending multiple transactions in a single user operation. This can be useful to save on fees, reduce number of user confirmations or to ensure that multiple transactions are executed atomically. A typical example is to do an approval and a transfer in a single userOperation. This way, the transfer will only happen if the approval is successful. diff --git a/apps/portal/src/app/connect/page.mdx b/apps/portal/src/app/connect/page.mdx index 0e72bab4e46..ce2e99b093f 100644 --- a/apps/portal/src/app/connect/page.mdx +++ b/apps/portal/src/app/connect/page.mdx @@ -83,7 +83,7 @@ Get started with Connect in your preferred language. - **Connect to 500+ different wallet providers** with support for every EVM network - **Log in and authenticate your users** with customizable and secure [email, phone, passkeys and social login](https://portal.thirdweb.com/connect/in-app-wallet/overview) flows. - **Sponsor transactions** to seamlessly onboard non-native or new crypto users with [Account Abstraction](https://portal.thirdweb.com/connect/account-abstraction/overview). -- **Perform wallet actions** like connecting and disconnecting wallets, viewing balance, displaying ENS names, and execute transactions with our [perfomant, reliable and type safe API](https://portal.thirdweb.com/connect/blockchain-api) +- **Perform wallet actions** like connecting and disconnecting wallets, viewing balance, displaying ENS names, and execute transactions with our [performant, reliable and type safe API](https://portal.thirdweb.com/connect/blockchain-api) - **Easily integrate with thirdweb's contracts** to enable users to interact with your application. - **Facilitate payments** by letting user top up their wallets or do onchain purchases with a credit card with [Pay](https://portal.thirdweb.com/connect/pay/overview). diff --git a/apps/portal/src/app/react/v5/account-abstraction/batching-transactions/page.mdx b/apps/portal/src/app/react/v5/account-abstraction/batching-transactions/page.mdx index 4fd93397dec..7c3e06c6c8c 100644 --- a/apps/portal/src/app/react/v5/account-abstraction/batching-transactions/page.mdx +++ b/apps/portal/src/app/react/v5/account-abstraction/batching-transactions/page.mdx @@ -12,7 +12,7 @@ export const metadata = createMetadata({ description: "How to batch transactions with smart accounts", }); -Batching transactions allows sending multiple transactions in a single user operation. This can be useful to save on fees, reduce number of user confimations or to ensure that multiple transactions are executed atomically. +Batching transactions allows sending multiple transactions in a single user operation. This can be useful to save on fees, reduce number of user confirmations or to ensure that multiple transactions are executed atomically. A typical example is to do an approval and a transfer in a single userOperation. This way, the transfer will only happen if the approval is successful. diff --git a/apps/portal/src/app/typescript/v5/account-abstraction/batching-transactions/page.mdx b/apps/portal/src/app/typescript/v5/account-abstraction/batching-transactions/page.mdx index ab431947f94..9917dcf614f 100644 --- a/apps/portal/src/app/typescript/v5/account-abstraction/batching-transactions/page.mdx +++ b/apps/portal/src/app/typescript/v5/account-abstraction/batching-transactions/page.mdx @@ -12,7 +12,7 @@ export const metadata = createMetadata({ description: "How to batch transactions with smart accounts", }); -Batching transactions allows sending multiple transactions in a single user operation. This can be useful to save on fees, reduce number of user confimations or to ensure that multiple transactions are executed atomically. +Batching transactions allows sending multiple transactions in a single user operation. This can be useful to save on fees, reduce number of user confirmations or to ensure that multiple transactions are executed atomically. A typical example is to do an approval and a transfer in a single userOperation. This way, the transfer will only happen if the approval is successful.