Skip to content

Strict run and add document metadata in runtime #1011

@ruslan-mogilevskiy

Description

@ruslan-mogilevskiy

Hi @daveaglick,

First of all, thanks for the cool engine for static sites. Playing with it for a while and it looks very promising.
Could you please guide me in the following questions:

  1. I've enabled Strict mode for the bootstrapper:
Bootstrapper.Factory.CreateWeb(args)
   .AddSetting(WebKeys.Strict, true)

and according to the documentation I expected that Statiq will throw an exception in runtime or at least stop/exit when some error occurred but it didn't. By the error, I mean smth like an invalid LESS file content (thrown by dotless), etc. but Statiq just logged the error in the control when started and that's all.
Q: How to terminate Statiq with a not-0 exit error code when something has failed on start?

  1. Is it possible to add custom metadata to a document in run-time (in the pipeline code, etc)? I see that the document inherits IMetadata which is read-only. My goal is to add the metadata in one of my pipelines and process it in another.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions