-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
templates: Add readFile
function, skips parsing contents as a template
#5553
Conversation
includeRaw
function, skips parsing contents as a template
…ing it as a template. Some formatting fixes
Fixed the formatting issues + squashed the two commits together |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, this LGTM. I'm just waiting to merge while I try to think of a better name than includeRaw
if one exists. :) That's all.
Maybe |
Yeah that's alright. It's not bad, just seems like an afterthought (which it is). What I should have done is named |
Maybe like readFile or something? |
I like |
includeRaw
function, skips parsing contents as a templatereadFile
function, skips parsing contents as a template
I pushed a commit to rename it, and I made some additional adjustments to the template docs cause I thought it wasn't super clear which functions would render in place and which would just return the buffer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM. (Don't mind the deleted comment; I was thrown off, not realizing that docs for other actions were edited -- I'm not sure why though.) (Edit: D'oh, just now seeing Francis' comment. Sigh.)
I think we can merge this 😃 Thanks for the contribution!
This is a fix for the issue I created earlier, closes #5552. It's mostly a copy-paste of the
include
function, but skips the template parsing step to just return the body of the file unmodified.