Skip to content

Add helper methods for remaining config properties #3666

@reubenlillie

Description

@reubenlillie

Is your feature request related to a problem? Please describe.

Setting up a fresh project from scratch, I think I found an inconsistency in the code base. It looks like some of the config properties have helper methods (like setLayoutDirectory()) but others still don’t (like markdownTemplateEngine and htmlTemplateEngine). This creates more of a design pattern issue than a pitfall, per se.

Describe the solution you'd like

Except it would be nice to keep configurations functional within the callback function rather than having a separate config export for the yet-to-be-implemented helper methods, especially since setting those properties within the return statement of the callback is potentially problematic for order of operations.

Describe alternatives you've considered

I’m using the optional export for now, specifically to leverage Markdown inside JavaScript templates without having to specify templateEngineOverride in each of them.

Having a full suite of one-liners like setLayoutDirectory() would taste that much more succulent.

Additional context

See the 11ty Discord.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions