-
Notifications
You must be signed in to change notification settings - Fork 57
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
Question: any way to use custom filters? #70
Comments
I believe this is already supported. If you want to filter something using a custom filter, you can use it like so:
Where Your template may look something like this:
|
Hi @awbraunstein - thanks for clarifying this! Please excuse my ignorance, but I didn't find the documentation. Do you have any wiki page or so, having the answer to questions as I had above? |
Documentation isn't great, but you can see this syntax referenced here: https://github.com/youtube/spitfire/blob/master/doc/SpitfireVsCheetah.md#placeholders-and-filters-should-be-easier-to-use-in-the-end Additionally, there are tests that use this syntax too. https://github.com/youtube/spitfire/blob/master/tests/filter_placeholder_2.tmpl#L10 I think that better documentation is something that this project needs. I'll open an issue to track this. |
Cheers @awbraunstein - may I suggest adding a dedicated wiki? It's a pretty good Github feature to manage docs. |
Yes. I think a wiki is the route we will go for documentation. Thanks for the suggestion. |
If you're interested, you can follow the documentation issue here: #71 |
Hello,
Thank you for opensourcing this project!
I'm very new to this library and the first question I have in mind (you may find it trivial): is there any flexible way to extend the list of existing filters?
More specifically, I am thinking about a way to inject external logic. If comfortable with the context, something similar to the Jinja filters.
Is this currently possible or on the roadmap?
Thanks,
Mircea
The text was updated successfully, but these errors were encountered: