{"id":15138750,"url":"https://github.com/bmatcuk/njk-brunch-static","last_synced_at":"2026-01-20T02:46:57.454Z","repository":{"id":57311135,"uuid":"302956997","full_name":"bmatcuk/njk-brunch-static","owner":"bmatcuk","description":"Compile static nunjucks files with brunch.","archived":false,"fork":false,"pushed_at":"2020-10-10T18:50:04.000Z","size":38,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-04T11:14:32.607Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bmatcuk.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":"2020-10-10T17:39:51.000Z","updated_at":"2020-10-10T18:50:06.000Z","dependencies_parsed_at":"2022-09-07T09:12:08.730Z","dependency_job_id":null,"html_url":"https://github.com/bmatcuk/njk-brunch-static","commit_stats":null,"previous_names":["bmatcuk/nunjucks-brunch-static"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bmatcuk/njk-brunch-static","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmatcuk%2Fnjk-brunch-static","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmatcuk%2Fnjk-brunch-static/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmatcuk%2Fnjk-brunch-static/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmatcuk%2Fnjk-brunch-static/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bmatcuk","download_url":"https://codeload.github.com/bmatcuk/njk-brunch-static/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmatcuk%2Fnjk-brunch-static/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28594958,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T02:08:49.799Z","status":"ssl_error","status_checked_at":"2026-01-20T02:08:44.148Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-09-26T07:44:17.300Z","updated_at":"2026-01-20T02:46:57.439Z","avatar_url":"https://github.com/bmatcuk.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Release](https://img.shields.io/npm/v/njk-brunch-static.svg)\n\n# njk-brunch-static\nCompile static nunjucks files with brunch.\n\nnjk-brunch-static is a processor for [html-brunch-static](https://github.com/bmatcuk/html-brunch-static), a [brunch](http://brunch.io/) plugin designed to handle static html files. njk-brunch-static can convert nunjucks files into static html files with html-brunch-static's support for layouts and partial views.\n\n## Installation\nnjk-brunch-static depends on [html-brunch-static](https://github.com/bmatcuk/html-brunch-static), which also depends on [brunch-static](https://github.com/bmatcuk/brunch-static), so, you will need to install all three. The recommended method is via npm:\n\n```bash\nnpm install --save-dev brunch-static html-brunch-static njk-brunch-static\n```\n\nOr manually:\n\n* Add `\"brunch-static\": \"x.y.z\"` to package.json\n* Add `\"html-brunch-static\": \"x.y.z\"` to package.json\n* Add `\"njk-brunch-static\": \"x.y.z\"` to package.json\n* Run `npm install`\n* Alternatively, you may use the latest git version with:\n  * `\"brunch-static\": \"git+ssh://git@github.com:bmatcuk/brunch-static\"`\n  * `\"html-brunch-static\": \"git+ssh://git@github.com:bmatcuk/html-brunch-static\"`\n  * `\"njk-brunch-static\": \"git+ssh://git@github.com:bmatcuk/njk-brunch-static\"`\n\n## Configuration\nAdd njk-brunch-static to your list of html-brunch-static processors:\n\n```coffee\nexports.config =\n  ...\n  plugins: {\n    static: {\n      processors: [\n        require('html-brunch-static')({\n          processors: [\n            require('njk-brunch-static')({\n              fileMatch: 'source/views/home.njk',\n              fileTransform: (filename) =\u003e filename.replace(/static\\.njk/, '.html')\n            })\n          ]\n        })\n      ]\n    }\n  }\n```\n\nMost options passed to njk-brunch-static are passed, verbatim, to [nunjucks](https://github.com/mozilla/nunjucks), with the exception of:\n\n* **fileMatch** _(default: `/\\.static\\.njk$/`)_\n\n  \u003e _fileMatch_ is an [anymatch](https://github.com/es128/anymatch) that is used to determine which files will be handled by this processor. As an anymatch, it may be a string with globs, a regex, or a function that takes a filename and returns true if it should be handled, or false otherwise. The default will match files that end in `.static.njk`.\n\n* **fileTransform** _(default: `(filename) =\u003e filename.replace(/static\\.njk$/, '.html')`)_\n\n  \u003e _fileTransform_ converts the input filename into an html filename. It takes a filename as input and returns the new filename with the html extension. If you set the _fileMatch_ property above, you'll probably need to set this option as well to ensure that your output files end with the html extension.\n\n## Context and Local Variables\nThe [html-brunch-static's context](https://github.com/bmatcuk/html-brunch-static#context-layouts-and-partials) will be exposed in your nunjucks files as local variables allowing you to use them in your template.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmatcuk%2Fnjk-brunch-static","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbmatcuk%2Fnjk-brunch-static","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmatcuk%2Fnjk-brunch-static/lists"}