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

Add ability to use pongo2 as an alternative to Go Template #254

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fdintino
Copy link

@fdintino fdintino commented Oct 1, 2017

This is more a proposal than a finished pull request—I wanted to gauge interest and get feedback on the implementation before I started writing tests and updating documentation.

pongo2 is a Go template engine that has a Django/Jinja2-style syntax. My interest in having this available as an option—besides personal preference—is that my development team at The Atlantic is very familiar with the syntax of jinja2, but less so with Go templates. It seems like there might also be others interested in this as well (e.g. #177).

In addition to adding the ability to use pongo2 as the template engine (either with the -engine pongo2 CLI flag or with engine = "pongo2" in a config file) I've ported the existing example templates to pongo2.

I was tempted to make the functions and context variables all lowercase / underscore-separated to make them more idiomatic for Django-style templates, but I thought that might be a bridge too far.

@fdintino
Copy link
Author

@jwilder any feedback?

@jwilder
Copy link
Collaborator

jwilder commented Oct 20, 2017

@fdintino I like it. I need to find some time to test it out, but looks pretty good at first glance.

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

Successfully merging this pull request may close these issues.

3 participants