Try new filename resolution for netlify function.

This commit is contained in:
Dillon Kearns 2021-12-30 09:27:20 -08:00
parent 2a90dc9d51
commit d0d205bee4
2 changed files with 3 additions and 2 deletions

View File

@ -126,7 +126,8 @@ view maybeUrl sharedModel static =
[ Html.h1 [] [ Html.text "You're not logged in" ]
, Route.link Route.Login
[]
[ Html.text <| "Login" ]
[ Html.text <| "Login"
]
]
]
}

View File

@ -227,7 +227,7 @@ async function runJob(app, filePath) {
pendingDataSourceCount += 1;
try {
const fileContents = (
await fsPromises.readFile(path.resolve(filePath))
await fsPromises.readFile(path.join(__dirname, filePath))
).toString();
const parsedFile = matter(fileContents);