How to make data available on all partials #83
Unanswered
newbieexplorer212
asked this question in
Q&A
Replies: 2 comments 1 reply
-
Solved using: Since this template engine is from squirrelly, i found the solution from: https://squirrelly.js.org/docs/syntax/partials-layouts#file-partials |
Beta Was this translation helpful? Give feedback.
1 reply
-
The question is why is this <%~ includeFile('include/_sidebar', it) %> not in the how to use the library, especially for Deno? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, thank you for this amazing template engine.
My data is stored in json file
eta.renderFile(file, JSON.parse(fs.readFileSync('src/eta/data.json')))
How to make data available on all partials, so I don't have to pass data every time I
includeFile
I can not and do not want to run the script below:
<%~ includeFile('include/_sidebar', JSON.parse(fs.readFileSync('src/eta/data.json'))) %>
Beta Was this translation helpful? Give feedback.
All reactions