Setting globals dynamically after opts argument removed from renderFile()
See original GitHub issueHi
I juste upgraded my app from LiquidJS 9.25.1 to the latest 9.28.6
I am facing bugs and just find that the opts
parameter of renderFile
has been removed in version 9.26.0 :
public async renderFile (file: string, ctx?: object, opts?: LiquidOptions) {
const templates = await this.parseFile(file, opts)
return this.render(templates, ctx, opts)
}
My app was using this parameter to pass a customized globals
setting to the rendered file (depending on the file, this is why I don’t set the globals
setting while creating the engine).
Is there another way to do this without re-creating an engine before each call to renderFile
?
P.S. as stated in #395 this should have been flagged as a breaking change in 9.26.0
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Dynamically set R markdown title, output filename, and global ...
I know the title can be made dynamic through the params YAML header but that doesn't help with the output filename or within...
Read more >You Can Definitely Use Global Variables To Manage Global ...
In both concepts the purpose of global(state & variable) is to allow sharing of a value among entities which might be functions, classes, ......
Read more >4.2 Set the document title dynamically | R Markdown Cookbook
With the title being a dynamic parameter, you can easily generate a batch of reports with different titles. We used the title as...
Read more >Handling dynamically created HTML in JavaScript - Medium
This is possible as the JavaScript is executed immediately after the elements are declared in the DOM — the elements are guaranteed to...
Read more >API — Jinja Documentation (3.0.x)
To render it with some variables, call the render() method. ... If this is set to True the first newline after a block...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is fortuitous because I was looking to do something like this as well. It seems to work for me. Thanks!
Hi @harttle
Seems to work perfectly with 9.29.0
Thanks!