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

Feature request: Example using a templating engine #6

Open
kokujin opened this issue Aug 12, 2016 · 2 comments
Open

Feature request: Example using a templating engine #6

kokujin opened this issue Aug 12, 2016 · 2 comments

Comments

@kokujin
Copy link

kokujin commented Aug 12, 2016

No description provided.

@hnry
Copy link
Collaborator

hnry commented Aug 12, 2016

There is an example: https://github.com/spirit-js/examples#rendering-templates-with-jade

Is that ok? If it is not clear, let me know why so I can update the example or show more examples?

A template ends up being a string, so you just return the string. And the template libraries have their own compiling function that you can use.

Only complicated part is having caching, but that really depends on what you want the cache to do.

Also other libraries exist for working with different templates https://github.com/tj/consolidate.js
Maybe I can show an example using that.

@kokujin
Copy link
Author

kokujin commented Aug 15, 2016

An example using consolidate would be great since it would cover several templating engines at the same time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants