{"id":14384960,"url":"https://github.com/MoOx/metalsmith-react","last_synced_at":"2025-08-23T18:31:01.777Z","repository":{"id":31329390,"uuid":"34891937","full_name":"MoOx/metalsmith-react","owner":"MoOx","description":"Metalsmith plugin to use React as a template engine","archived":true,"fork":false,"pushed_at":"2022-05-17T07:31:23.000Z","size":19,"stargazers_count":12,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-09T10:49:46.616Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/MoOx.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2015-05-01T06:15:27.000Z","updated_at":"2023-11-07T08:54:36.000Z","dependencies_parsed_at":"2022-08-29T09:50:38.006Z","dependency_job_id":null,"html_url":"https://github.com/MoOx/metalsmith-react","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/MoOx/metalsmith-react","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MoOx%2Fmetalsmith-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MoOx%2Fmetalsmith-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MoOx%2Fmetalsmith-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MoOx%2Fmetalsmith-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MoOx","download_url":"https://codeload.github.com/MoOx/metalsmith-react/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MoOx%2Fmetalsmith-react/sbom","scorecard":{"id":95255,"data":{"date":"2025-08-11","repo":{"name":"github.com/MoOx/metalsmith-react","commit":"66fda211d1bb34d1da11d42c48fd7263dbbb4788"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":1,"reason":"Found 2/16 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 3 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-15T08:51:05.817Z","repository_id":31329390,"created_at":"2025-08-15T08:51:05.817Z","updated_at":"2025-08-15T08:51:05.817Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271762887,"owners_count":24816828,"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","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-08-28T18:01:48.884Z","updated_at":"2025-08-23T18:31:01.524Z","avatar_url":"https://github.com/MoOx.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# metalsmith-react [![Travis Build Status](https://travis-ci.org/MoOx/metalsmith-react.svg)](https://travis-ci.org/MoOx/metalsmith-react)\n\n\u003e Metalsmith plugin to use React as a template engine\n\n---\n\n## _Is it possible to use React on the front-end to be able to use stuff like `onClick`?_\n\nThat's a really good question.\nThis can be probably done with metalsmith, but this tool is not the right choice.\nNot front-end oriented enough.\n\n**Have a look to [Next.js](https://nextjs.org) instead !**\n\nNote that this module doesn't handle jsx.\nYou might use [babel(-node)](http://babeljs.io/) to handle that.\n\n## Install\n\n```console\n$ npm install metalsmith-react\n```\n\n## Usage\n\n```js\nimport Metalsmith from \"metalsmith\"\nimport react from \"metalsmith-react\"\n\nnew Metalsmith(\"./\")\n  .use(\n    react({\n      pattern: \"**/*.md\",\n      templatesPath: \"modules\", // default to \"templates\"\n      before: \"\u003c!doctype html\u003e\\n\",\n      data: {\n        some: \"data\", // you might be able to consume that as props in the template\n      },\n      reactRender: \"renderToStaticMarkup\" //you can use \"renderToString\" if you want\n    })\n  )\n  .build(err =\u003e {if (err) {throw err}})\n```\n\nSee [__tests__](__tests__) for templates examples\n\n### Options\n\n#### `templatesPath` (default: `\"templates\"`)\n\nPlace to read react templates (class)\n\n#### `defaultTemplate` (default: `\"default\"`)\n\nName of the default template file (relative to `templatesPath`)\n\n#### `pattern` (default: `\"**/*\"`),\n\nPattern to filter files. Used by [multimatch](https://github.com/sindresorhus/multimatch)\n\n#### `data` (default: `{}`)\n\nObject passed to React component in addition to the file itself.\n\n#### `before` (default: \"\")\n\nAllows to prepend something before the rendered component (eg: `{before: \"\u003c!doctype html\u003e\\n\"}`)\n\n#### `after` (default: \"\")\n\nAllows to append something after the rendered component\n\n#### `reactRender` (default: `\"renderToStaticMarkup\"`)\n\nReact render method. You can use `\"renderToString\"` if you want.\n\n---\n\n## CONTRIBUTING\n\n* ⇄ Pull requests and ★ Stars are always welcome.\n* For bugs and feature requests, please create an issue.\n* Pull requests must be accompanied by passing automated tests (`$ npm test`).\n\n## [CHANGELOG](CHANGELOG.md)\n\n## [LICENSE](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMoOx%2Fmetalsmith-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMoOx%2Fmetalsmith-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMoOx%2Fmetalsmith-react/lists"}