You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If my documents.body function returns Err String because the markdown document has syntax errors then that's what I end up getting in the generated html file.
This is unexpected and not very useful. It would be nice if this body would fail the build in case the return value is Err _ but probably in such case it would be more suitable that the body would be a Decoder of some sort, though I am just speculating.
The text was updated successfully, but these errors were encountered:
Hello @tgelu, thank you for reporting the issue. This is a regression, and it's definitely not the intended behavior. I'll try to get a fix out for this soon. Sorry for the inconvenience, this is definitely an important one!
I'm not exactly sure what the ideal solution is, but I think I found a line where I can just check if there are any errors upon completion and do process.exit(1). The output is a little messy, but at least it will fail the build as expected. So I'll go with that solution for now.
Any ideas for a cleaner way to do it are very much welcome!
The type of
Pages.Platform.init
has the following type definition for thedocuments
property:If my
documents.body
function returnsErr String
because the markdown document has syntax errors then that's what I end up getting in the generatedhtml
file.This is unexpected and not very useful. It would be nice if this
body
would fail the build in case the return value isErr _
but probably in such case it would be more suitable that thebody
would be aDecoder
of some sort, though I am just speculating.The text was updated successfully, but these errors were encountered: