docs: fix edit button on resources homepage (#7967)

This commit is contained in:
Shahed Nasser
2024-07-05 10:52:43 +02:00
committed by GitHub
parent 3e86cb6ac3
commit 36c1db7479
2 changed files with 10 additions and 108 deletions
@@ -24,14 +24,16 @@ async function scanFiles(options = {}) {
for (const file of files) {
const filePath = path.join(fullPath, file)
const fileBasename = path.basename(file)
if (fileBasename !== "page.mdx" && statSync(filePath).isDirectory()) {
filesMap.push(
...(await scanFiles({
dir: filePath.replace(basePath, ""),
basePath,
baseSlug,
}))
)
if (fileBasename !== "page.mdx") {
if (statSync(filePath).isDirectory()) {
filesMap.push(
...(await scanFiles({
dir: filePath.replace(basePath, ""),
basePath,
baseSlug,
}))
)
}
continue
}