{"id":15018092,"url":"https://github.com/softonic/nunjucks-include-with","last_synced_at":"2025-10-23T15:31:28.593Z","repository":{"id":65369981,"uuid":"84937713","full_name":"softonic/nunjucks-include-with","owner":"softonic","description":"Nunjucks extension that allows send data to include template.","archived":false,"fork":false,"pushed_at":"2019-12-10T11:57:25.000Z","size":32,"stargazers_count":13,"open_issues_count":0,"forks_count":3,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-01-30T19:11:26.369Z","etag":null,"topics":["context","extension","nunjucks","with"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/softonic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-14T10:45:33.000Z","updated_at":"2023-01-23T22:37:12.000Z","dependencies_parsed_at":"2023-01-19T23:15:18.890Z","dependency_job_id":null,"html_url":"https://github.com/softonic/nunjucks-include-with","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softonic%2Fnunjucks-include-with","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softonic%2Fnunjucks-include-with/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softonic%2Fnunjucks-include-with/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softonic%2Fnunjucks-include-with/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/softonic","download_url":"https://codeload.github.com/softonic/nunjucks-include-with/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237852294,"owners_count":19376649,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["context","extension","nunjucks","with"],"created_at":"2024-09-24T19:51:26.543Z","updated_at":"2025-10-23T15:31:28.298Z","avatar_url":"https://github.com/softonic.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nunjucks-include-with\n\nNunjucks extension that allows send data to include template.\n\n## Installation\n\n```bash\nnpm install nunjucks-include-with\n```\n\n## Usage\n\n```javascript\n// CommonJS\n// const IncludeWithNunjucksExtension = require('nunjucks-include-with');\n\n// ES6\nimport IncludeWithNunjucksExtension from 'nunjucks-include-with';\nimport nunjucks from 'nunjucks';\n\n// Registration\nconst nunjucksEnv = nunjucks.configure('views');\nnunjucksEnv.addExtension('includeWith', new IncludeWithNunjucksExtension({\n  nunjucksEnv\n }));\n\n//Template\n{% includeWith \"../partial.tpl\", { name: 'Test' } %}\n```\n\n## Extension Options\n\n### IncludeWithNunjucksExtension({Object})\n\n| Name | Type | Default | Description |\n| --- | --- | --- | --- |\n| nunjucksEnv | `Environment` |  | Instance of Nunjucks environment. https://mozilla.github.io/nunjucks/api.html#environment |\n| tagName | `String` | `includeWith` | Name for the tag in the template. |\n\n## Template Options\n\n### {% includeWith {String}, {Object}, {Object} %}\n\n| Name | Type | Default | Description |\n| --- | --- | --- | --- |\n| templatePath | `String` |  | Path of the included template. |\n| data | `Object` | `{}` | Object with the data for the included template. |\n| options | `Object` | `{ useContext = true }` | Option to include the global context. |\n\n\n## Contribute\n\n1. Fork it: `git clone https://github.com/softonic/nunjucks-include-with.git`\n2. Create your feature branch: `git checkout -b feature/my-new-feature`\n3. Commit your changes: `git commit -am 'Added some feature'`\n4. Check the build: `npm run build`\n4. Push to the branch: `git push origin my-new-feature`\n5. Submit a pull request :D\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftonic%2Fnunjucks-include-with","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoftonic%2Fnunjucks-include-with","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftonic%2Fnunjucks-include-with/lists"}