From 54a4cf939d7f2f5e0114eb17653fd2f7c7f73269 Mon Sep 17 00:00:00 2001 From: Antoine BERNIER Date: Mon, 12 Aug 2024 00:02:37 +0200 Subject: [PATCH] tweaks --- src/utils/docs.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/utils/docs.tsx b/src/utils/docs.tsx index 14dbf530..c410b6d7 100644 --- a/src/utils/docs.tsx +++ b/src/utils/docs.tsx @@ -140,11 +140,9 @@ async function _getDocs( // Calculate the relative path from the file path after the root const relativePath = file.substring(normalizedRoot.length) // "/advanced/performance.md" // Extract the directory path from the relative path (excluding the file name) - const directoryPath = relativePath.split('/').slice(0, -1).join('/') // "advanced" - // Combine the lastFolderName with the directoryPath using template literals - const folderPath = `/${lastFolderName}/${directoryPath}` // "/docs/advanced" + const directoryPath = relativePath.split('/').slice(0, -1).join('/') // "/advanced" - const url = `${inlineImagesOrigin}${folderPath}/${src}` // "https://github.com/pmndrs/uikit/raw/main/docs/advanced/./basic-example.gif" + const url = `${inlineImagesOrigin}/${lastFolderName}${directoryPath}/${src}` // "https://github.com/pmndrs/uikit/raw/main/docs/advanced/./basic-example.gif" return `${prefix}${url}${suffix}` }