Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add helper methods for remaining config properties #3666

Open
reubenlillie opened this issue Feb 24, 2025 · 0 comments
Open

Add helper methods for remaining config properties #3666

reubenlillie opened this issue Feb 24, 2025 · 0 comments

Comments

@reubenlillie
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant