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

Configuration Option "views": support multiple directories with fallbacks #288

Open
recrof opened this issue May 31, 2024 · 1 comment
Open

Comments

@recrof
Copy link

recrof commented May 31, 2024

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

I have multiple directories that contain templates with same file name:

templates/more-specific-dir/header.eta
templates/more-specific-dir/footer.eta
templates/header.eta
templates/footer.eta
templates/body.eta

I would like to be able to use template from templates/more-specific-dir/ if it exists, but fallback to templates/ if eta can't find it in first directory(like body.eta).

Describe the solution you'd like

Configuration option views could support array as value.
example: ['templates/primary-directory', 'templates/first-fallback', 'templates/second-fallback', ...]

Describe alternatives you've considered

ejs supports multiple directories for views, however I like Eta better.

@multivoltage
Copy link
Contributor

It seems a cool feature

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

No branches or pull requests

2 participants