diff --git a/app/partials/LatestDocs.tsx b/app/partials/LatestDocs.tsx index 8de1d6e..f1ae701 100644 --- a/app/partials/LatestDocs.tsx +++ b/app/partials/LatestDocs.tsx @@ -8,7 +8,7 @@ export function LatestDocs() { const data = useData(); return ( -
+

Dernières documentations

diff --git a/app/services/DocCache.ts b/app/services/DocCache.ts index 8e45005..6153a5f 100644 --- a/app/services/DocCache.ts +++ b/app/services/DocCache.ts @@ -263,7 +263,7 @@ class DocCache { const checkIfExcludedFileNames = (doc: SectionCache) => { if (config.excludedFileNames.length > 0) { return !config.excludedFileNames.some((fileName) => { - return doc.filePath.includes(fileName); + return doc.filePath === fileName; }); } @@ -273,12 +273,24 @@ class DocCache { const sortedDocs = Array.from(this.cache.values()) .sort((a, b) => b.lastEdit.getTime() - a.lastEdit.getTime()) .filter((doc) => { - return [ + const isIncluded = [ checkIfIncludedBasePath(doc), checkIfExcludedBasePaths(doc), checkIfIncludedFileNames(doc), checkIfExcludedFileNames(doc), ].every((check) => check === true); + + // DEBUG + // if (!isIncluded) { + // console.group(doc.filePath); + // console.log("includedBasePaths", checkIfIncludedBasePath(doc)); + // console.log("excludedBasePaths", checkIfExcludedBasePaths(doc)); + // console.log("includedFileNames", checkIfIncludedFileNames(doc)); + // console.log("excludedFileNames", checkIfExcludedFileNames(doc)); + // console.groupEnd(); + // } + + return isIncluded; }); if (config.limit > 0) return sortedDocs.slice(0, config.limit);