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

Allow Eta to handle absolute paths in partials #15

Merged
merged 5 commits into from Sep 8, 2020
Merged

Conversation

nebrelbug
Copy link
Collaborator

The main effect of this PR would be to allow absolute paths in partials: for example, <%~ E.includeFile("/partials/footer.html") %> would work.

To keep renderFile working, Eta would first search for the template in each view directory. Finally, it would fall back to searching config.root (which is, by default, "/").

This PR also contains an error mechanism where, if Eta can't find a file, it lists all of the locations it searched for the file.

@github-actions
Copy link

github-actions bot commented Sep 8, 2020

size-limit report

Path Size
dist/browser/eta.min.js 2.05 KB (0%)

@nebrelbug nebrelbug merged commit 0d3501d into master Sep 8, 2020
@nebrelbug nebrelbug deleted the fix-abs-root branch September 8, 2020 17:53
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

Successfully merging this pull request may close these issues.

None yet

1 participant