diff --git a/views/helpers/functions.js b/views/helpers/functions.js index 989dcf9f..7cf21a69 100644 --- a/views/helpers/functions.js +++ b/views/helpers/functions.js @@ -50,7 +50,7 @@ const shouldOmitLinkOnLastBreadcrumb = ({paths, index}) => (index == paths.lengt const resolveReadmeFile = ({directory}) => { const resolveFile = (file) => { - const pathToFile = path.join(process.cwd(), "..", directory, file) + const pathToFile = path.join(__dirname, "..", "..", directory, file); return fs.existsSync(pathToFile) ? pathToFile : ""; }; return ( @@ -58,7 +58,7 @@ const resolveReadmeFile = ({directory}) => { resolveFile("README.txt") || resolveFile("README") || resolveFile("README.html") || - "" + undefined ); }; const directoryContainsReadme = ({directory}) => resolveReadmeFile({directory});