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

Make it possible to pass a file reference for data #5

Open
thiagodemellobueno opened this issue Sep 9, 2016 · 2 comments
Open

Make it possible to pass a file reference for data #5

thiagodemellobueno opened this issue Sep 9, 2016 · 2 comments

Comments

@thiagodemellobueno
Copy link

Would be very nifty if the render function could take a "jsonPath" option.
something like
return template.render.bind(template, getJSONFromFile(options.jsonPath))

@RobLoach
Copy link
Member

RobLoach commented Nov 17, 2016

Ah, like retrieve some extra options from some given .json file? Interesting idea. This could be something we put in where the Twig template is built. Usually it takes it from YAML front-matter, but we could do something like have it be a Twig function that expands the local variable table.

Or something... We'll need to do some thinking.

@thiagodemellobueno
Copy link
Author

since kss uses the jsons, we probably want to use the same files. but seems acheivable!

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

No branches or pull requests

2 participants