1
0
mirror of https://github.com/danog/liquid.git synced 2024-12-02 12:27:45 +01:00
Commit Graph

21 Commits

Author SHA1 Message Date
Carolyn Van Slyck
2e107bef29 Expose the template ast
Sometimes a consumer of a template needs to know what objects were used.
In my case, a template can reference secret values from a secret store
vault and instead of passing all possible secrets to the template only
to render two of them, we use the ast to determine which are used and
only retrieve those values from the vault before rendering the template.

Exposing the ast allows us to use the liquid APIs just like normal,
without having to jump through hoops to build the ast ourselves using
the other types exported in this library.

Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
2022-01-31 16:18:38 -06:00
Oliver Steele
92a4f2d500 Source location is an initialization parameter
Fixes a race condition
2017-07-14 10:38:30 -04:00
Oliver Steele
16c3b6ea59 Add ParseTemplateLocation 2017-07-14 10:17:34 -04:00
Oliver Steele
df80e8cddb Rename Config.Filename -> SourcePath 2017-07-12 07:19:58 -04:00
Oliver Steele
378c0b207e Update remaining public API to return SourceError 2017-07-10 11:52:14 -04:00
Oliver Steele
342a8b3e81 errors return source location, phase 1 2017-07-10 11:49:14 -04:00
Oliver Steele
ebb37f83df Change Engine, Template from Interface -> struct 2017-07-10 09:16:35 -04:00
Oliver Steele
328d84f5cd comments 2017-07-10 08:03:31 -04:00
Oliver Steele
4472b1594c Add error line number 2017-07-09 11:49:24 -04:00
Oliver Steele
c599761c6a simplify 2017-07-07 05:51:40 -04:00
Oliver Steele
903acb8d2e Split package render->parser 2017-07-07 05:51:40 -04:00
Oliver Steele
5425668094 Add Template.SetSourcePath 2017-07-04 16:48:38 -04:00
Oliver Steele
411a2f0708 Rename render.(Context,RenderContext) -> (NodeContext,Context) 2017-07-04 11:41:45 -04:00
Oliver Steele
405c5bf694 Rename Settings -> Config 2017-07-04 11:08:57 -04:00
Oliver Steele
6161e6df28 Move chunks -> render 2017-07-04 11:03:18 -04:00
Oliver Steele
05597307bd Render uses a switch instead of polymorphism 2017-07-04 10:25:29 -04:00
Oliver Steele
cb8911a22c Remove gratuitous Context wrapper 2017-07-02 21:17:04 -04:00
Oliver Steele
d6bc456ee4 New top-level Context wrapper 2017-07-01 23:52:38 -04:00
Oliver Steele
2e9903ffe6 Filters are an engine configuration 2017-06-30 16:13:18 -04:00
Oliver Steele
e9c35a35d0 Implement forloop variables 2017-06-28 20:49:38 -04:00
Oliver Steele
e21d2a736d Add public DefineTag 2017-06-27 07:43:42 -04:00