Title: How to add custom Nunjucks Filters · Issue #5 · stackbit/unibit · GitHub
Open Graph Title: How to add custom Nunjucks Filters · Issue #5 · stackbit/unibit
X Title: How to add custom Nunjucks Filters · Issue #5 · stackbit/unibit
Description: Hello, Sorry in advanced for my noobishness in this... I have made a custom Nunjucks Filter but I can't find a way to add it to the Unibit dependency Nunjucks in order to extend it as it was described in Nunjucks documentation.. Could so...
Open Graph Description: Hello, Sorry in advanced for my noobishness in this... I have made a custom Nunjucks Filter but I can't find a way to add it to the Unibit dependency Nunjucks in order to extend it as it was descri...
X Description: Hello, Sorry in advanced for my noobishness in this... I have made a custom Nunjucks Filter but I can't find a way to add it to the Unibit dependency Nunjucks in order to extend it as it was de...
Opengraph URL: https://github.com/stackbit/unibit/issues/5
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"How to add custom Nunjucks Filters","articleBody":"Hello,\r\n\r\nSorry in advanced for my noobishness in this...\r\n\r\nI have made a custom Nunjucks Filter but I can't find a way to add it to the Unibit dependency Nunjucks in order to extend it as it was described in Nunjucks documentation..\r\n\r\nCould somebody help me to navigate through this?\r\n\r\nThe custom filter I made is in the file located at /index.js has the following:\r\n\r\n```js\r\nvar nunjucks = require('nunjucks');\r\nvar env = new nunjucks.Environment();\r\nvar crypto = require('crypto');\r\n\r\nenv.addFilter('md5', function(str) {\r\n return crypto.createHash('md5').update(str).digest(\"hex\");\r\n});\r\n```\r\nBut it is not being picked up by anything..\r\n\r\nWhat i need is the following to work:\r\n```\r\n{% hash = some_variable | md5 %}\r\n```\r\n\r\nRegards","author":{"url":"https://github.com/andriusdj","@type":"Person","name":"andriusdj"},"datePublished":"2020-04-13T09:40:15.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/5/unibit/issues/5"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b7c8941e-1fd5-8e51-b427-4a070500180c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BB52:1D84DC:10E62BC:15D8225:698FD675 |
| html-safe-nonce | 7ebb867e4bef9aefe8324b592af0b9d1ff5ce1edb58bfad858eda227081c858a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQjUyOjFEODREQzoxMEU2MkJDOjE1RDgyMjU6Njk4RkQ2NzUiLCJ2aXNpdG9yX2lkIjoiNDU2NDcwMDE1MTcyMjAwNjEzMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 80ef84efeef3db4b385c17d93caa3aa2e7ecc597373b0607e70afdefd82b65fa |
| hovercard-subject-tag | issue:598788185 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/stackbit/unibit/5/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5d324b72327550dbecdebc2e0f0308b4c048bc25a44de84862ea5f39241c42ad/stackbit/unibit/issues/5 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5d324b72327550dbecdebc2e0f0308b4c048bc25a44de84862ea5f39241c42ad/stackbit/unibit/issues/5 |
| og:image:alt | Hello, Sorry in advanced for my noobishness in this... I have made a custom Nunjucks Filter but I can't find a way to add it to the Unibit dependency Nunjucks in order to extend it as it was descri... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | andriusdj |
| hostname | github.com |
| expected-hostname | github.com |
| None | 42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b |
| turbo-cache-control | no-preview |
| go-import | github.com/stackbit/unibit git https://github.com/stackbit/unibit.git |
| octolytics-dimension-user_id | 38996451 |
| octolytics-dimension-user_login | stackbit |
| octolytics-dimension-repository_id | 193671645 |
| octolytics-dimension-repository_nwo | stackbit/unibit |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 193671645 |
| octolytics-dimension-repository_network_root_nwo | stackbit/unibit |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d320682233dfd4d28c0b30554a564c2fcd229032 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width