{"action":"closed","issue":{"url":"https://api.github.com/repos/Ceasar/staticjinja/issues/40","labels_url":"https://api.github.com/repos/Ceasar/staticjinja/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/Ceasar/staticjinja/issues/40/comments","events_url":"https://api.github.com/repos/Ceasar/staticjinja/issues/40/events","html_url":"https://github.com/Ceasar/staticjinja/issues/40","id":53836830,"number":40,"title":"How to add jinja2 filters?","user":{"login":"sahuguet","id":355907,"avatar_url":"https://avatars.githubusercontent.com/u/355907?v=3","gravatar_id":"","url":"https://api.github.com/users/sahuguet","html_url":"https://github.com/sahuguet","followers_url":"https://api.github.com/users/sahuguet/followers","following_url":"https://api.github.com/users/sahuguet/following{/other_user}","gists_url":"https://api.github.com/users/sahuguet/gists{/gist_id}","starred_url":"https://api.github.com/users/sahuguet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sahuguet/subscriptions","organizations_url":"https://api.github.com/users/sahuguet/orgs","repos_url":"https://api.github.com/users/sahuguet/repos","events_url":"https://api.github.com/users/sahuguet/events{/privacy}","received_events_url":"https://api.github.com/users/sahuguet/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/Ceasar/staticjinja/milestones/1","labels_url":"https://api.github.com/repos/Ceasar/staticjinja/milestones/1/labels","id":928167,"number":1,"title":"0.4","description":"0.4 introduces some more backward-incompatible changes, but should dramatically improve the experience for new users.","creator":{"login":"Ceasar","id":625822,"avatar_url":"https://avatars.githubusercontent.com/u/625822?v=3","gravatar_id":"","url":"https://api.github.com/users/Ceasar","html_url":"https://github.com/Ceasar","followers_url":"https://api.github.com/users/Ceasar/followers","following_url":"https://api.github.com/users/Ceasar/following{/other_user}","gists_url":"https://api.github.com/users/Ceasar/gists{/gist_id}","starred_url":"https://api.github.com/users/Ceasar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ceasar/subscriptions","organizations_url":"https://api.github.com/users/Ceasar/orgs","repos_url":"https://api.github.com/users/Ceasar/repos","events_url":"https://api.github.com/users/Ceasar/events{/privacy}","received_events_url":"https://api.github.com/users/Ceasar/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":2,"state":"open","created_at":"2015-01-09T05:57:52Z","updated_at":"2015-01-13T01:35:56Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2015-01-09T06:07:58Z","updated_at":"2015-01-13T01:35:56Z","closed_at":"2015-01-13T01:35:56Z","body":"I would like to be able to define my own jinja2 filters.\r\nThe current code instantiate the environment (at https://github.com/Ceasar/staticjinja/blob/master/staticjinja/staticjinja.py#L353) and there is no way to pass any filter.\r\nOnce the Renderer is created, there is no way to access the environment underneath.\r\n\r\nTo support filters, I see two options:\r\n- change the make_renderer method to add a new parameter called filters=[]\r\n- add a method to class Renderer (https://github.com/Ceasar/staticjinja/blob/master/staticjinja/staticjinja.py#L22) with a method to get the underlying environment object.\r\n"}}