ionide / Fornax

Scriptable static site generator using type safe F# DSL to define page templates.
MIT License
244 stars 44 forks source link

When adding an error to the context the Message is not logged in the console #113

Open MangelMaxime opened 2 years ago

MangelMaxime commented 2 years ago

This generator always add an error into the context.

let generate (ctx: SiteContents) (_projectRoot: string) (page: string) =

        let error =
            {
                Path = page
                Message = $"Post %s{page} not found in the context"
                Phase = Generating
            }

        ctx.AddError error

        Layout.generationErrorPage ctx

The only log we get back is:

BAD FILE: posts/first.md

I think it would make sense to also log the message so the user understand the reason of the error.