ionide / Fornax

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

`fornax new` generates project that fails to build #109

Closed Jlll1 closed 1 year ago

Jlll1 commented 1 year ago

Describe the bug The project generated with fornax new fails to build.

$ fornax build
Load Errors: [|/home/rb/source/fornax-playground/generators/layout.fsx (67,53)-(67,59) typecheck error The union cases or fields of the type 'HtmlElement' are not accessible from this code location;
  /home/rb/source/fornax-playground/generators/layout.fsx (67,53)-(67,89) typecheck error All elements of a list must be implicitly convertible to the type of the first element, which here is 'HtmlProperties'. This element has type 'HtmlElement'.|]
Open Errors: [|input.fsx (1,6)-(1,11) typecheck error The namespace or module 'Index' is not defined.|]
Get generator Errors: [|input.fsx (1,16)-(1,24) typecheck error The value or constructor 'generate' is not defined. Maybe you want one of the following:
   Generating
   GenerationPhase
   GeneratorConfig
   GeneratorOutput
   GeneratorTrigger|]
[16:40:49] multiple files generation failed

To Reproduce Steps to reproduce the behaviour:

  1. Create a new project using fornax new
  2. Try to build it using fornax build or fornax watch
  3. See error

Expected behaviour The project should build without any problems

Environment (please complete the following information):

MangelMaxime commented 1 year ago

Hello @Jlll1,

I send a PR to fix this issue. If you need it now, please look at it this is a one line change.