{"id":14982167,"url":"https://github.com/remcohaszing/remark-mdx-frontmatter","last_synced_at":"2025-10-03T13:43:42.612Z","repository":{"id":43354121,"uuid":"345328434","full_name":"remcohaszing/remark-mdx-frontmatter","owner":"remcohaszing","description":"A remark plugin for converting frontmatter metadata into MDX exports","archived":false,"fork":false,"pushed_at":"2025-06-04T17:33:32.000Z","size":965,"stargazers_count":127,"open_issues_count":0,"forks_count":7,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-13T17:23:36.802Z","etag":null,"topics":["frontmatter","markdown","markdown-frontmatter","mdast","mdx","remark","remark-plugin","toml","unified","yaml"],"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/remcohaszing.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"remcohaszing"}},"created_at":"2021-03-07T11:27:07.000Z","updated_at":"2025-07-11T10:12:20.000Z","dependencies_parsed_at":"2022-07-14T12:50:53.459Z","dependency_job_id":"0ef581a5-64ba-4b51-85aa-d7c945260754","html_url":"https://github.com/remcohaszing/remark-mdx-frontmatter","commit_stats":{"total_commits":38,"total_committers":2,"mean_commits":19.0,"dds":0.02631578947368418,"last_synced_commit":"fa93b864749f1994a82211a07b18bc5e922becfc"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/remcohaszing/remark-mdx-frontmatter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remcohaszing%2Fremark-mdx-frontmatter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remcohaszing%2Fremark-mdx-frontmatter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remcohaszing%2Fremark-mdx-frontmatter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remcohaszing%2Fremark-mdx-frontmatter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/remcohaszing","download_url":"https://codeload.github.com/remcohaszing/remark-mdx-frontmatter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remcohaszing%2Fremark-mdx-frontmatter/sbom","scorecard":{"id":770130,"data":{"date":"2025-08-11","repo":{"name":"github.com/remcohaszing/remark-mdx-frontmatter","commit":"b59e37754bd746040d927ba46ea25ee7f912f578"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.4,"checks":[{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","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":"Maintained","score":10,"reason":"11 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yaml:1","Info: no jobLevel write permissions found"],"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":"Pinned-Dependencies","score":5,"reason":"dependency not pinned by hash detected -- score normalized to 5","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/remcohaszing/remark-mdx-frontmatter/ci.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/remcohaszing/remark-mdx-frontmatter/ci.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/remcohaszing/remark-mdx-frontmatter/ci.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/remcohaszing/remark-mdx-frontmatter/ci.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/remcohaszing/remark-mdx-frontmatter/ci.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/remcohaszing/remark-mdx-frontmatter/ci.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/remcohaszing/remark-mdx-frontmatter/ci.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/remcohaszing/remark-mdx-frontmatter/ci.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/remcohaszing/remark-mdx-frontmatter/ci.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:64: update your workflow using https://app.stepsecurity.io/secureworkflow/remcohaszing/remark-mdx-frontmatter/ci.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:65: update your workflow using https://app.stepsecurity.io/secureworkflow/remcohaszing/remark-mdx-frontmatter/ci.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yaml:70: update your workflow using https://app.stepsecurity.io/secureworkflow/remcohaszing/remark-mdx-frontmatter/ci.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yaml:72: update your workflow using https://app.stepsecurity.io/secureworkflow/remcohaszing/remark-mdx-frontmatter/ci.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:87: update your workflow using https://app.stepsecurity.io/secureworkflow/remcohaszing/remark-mdx-frontmatter/ci.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:91: update your workflow using https://app.stepsecurity.io/secureworkflow/remcohaszing/remark-mdx-frontmatter/ci.yaml/main?enable=pin","Info:   0 out of  13 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned","Info:   5 out of   5 npmCommand dependencies pinned"],"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":"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.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md: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 'main'"],"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":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/remcohaszing/.github/SECURITY.md:1","Info: Found linked content: github.com/remcohaszing/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/remcohaszing/.github/SECURITY.md:1","Info: Found text in security policy: github.com/remcohaszing/.github/SECURITY.md:1"],"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":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/ci.yaml:75"],"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":"Vulnerabilities","score":8,"reason":"2 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-xffm-g5w8-qvg7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T01:59:11.548Z","repository_id":43354121,"created_at":"2025-08-23T01:59:11.548Z","updated_at":"2025-08-23T01:59:11.548Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278173298,"owners_count":25942293,"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-10-03T02:00:06.070Z","response_time":53,"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":["frontmatter","markdown","markdown-frontmatter","mdast","mdx","remark","remark-plugin","toml","unified","yaml"],"created_at":"2024-09-24T14:04:54.212Z","updated_at":"2025-10-03T13:43:42.607Z","avatar_url":"https://github.com/remcohaszing.png","language":"JavaScript","funding_links":["https://github.com/sponsors/remcohaszing"],"categories":[],"sub_categories":[],"readme":"# remark-mdx-frontmatter\n\n[![github actions](https://github.com/remcohaszing/remark-mdx-frontmatter/actions/workflows/ci.yaml/badge.svg)](https://github.com/remcohaszing/remark-mdx-frontmatter/actions/workflows/ci.yaml)\n[![codecov](https://codecov.io/gh/remcohaszing/remark-mdx-frontmatter/branch/main/graph/badge.svg)](https://codecov.io/gh/remcohaszing/remark-mdx-frontmatter)\n[![npm version](https://img.shields.io/npm/v/remark-mdx-frontmatter)](https://www.npmjs.com/package/remark-mdx-frontmatter)\n[![npm downloads](https://img.shields.io/npm/dm/remark-mdx-frontmatter)](https://www.npmjs.com/package/remark-mdx-frontmatter)\n\nA [remark](https://remark.js.org) plugin for converting frontmatter metadata into MDX exports\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [API](#api)\n  - [Options](#options)\n- [Compatibility](#compatibility)\n- [License](#license)\n\n## Installation\n\nThis package depends on the AST output by\n[remark-frontmatter](https://github.com/remarkjs/remark-frontmatter)\n\n```sh\nnpm install remark-frontmatter remark-mdx-frontmatter\n```\n\n## Usage\n\nThis remark plugin takes frontmatter content, and outputs it as JavaScript exports. Both YAML and\nTOML frontmatter data are supported.\n\nFor example, given a file named `example.mdx` with the following contents:\n\n```mdx\n---\nhello: frontmatter\n---\n\nRest of document\n```\n\nThe following script:\n\n```js\nimport { readFile } from 'node:fs/promises'\n\nimport { compile } from '@mdx-js/mdx'\nimport remarkFrontmatter from 'remark-frontmatter'\nimport remarkMdxFrontmatter from 'remark-mdx-frontmatter'\n\nconst { value } = await compile(await readFile('example.mdx'), {\n  jsx: true,\n  remarkPlugins: [remarkFrontmatter, remarkMdxFrontmatter]\n})\nconsole.log(value)\n```\n\nRoughly yields:\n\n```jsx\nexport const frontmatter = {\n  hello: 'frontmatter'\n}\n\nexport default function MDXContent() {\n  return \u003cp\u003eRest of document\u003c/p\u003e\n}\n```\n\n## API\n\nThe default export is a [remark](https://remark.js.org) plugin.\n\n### Options\n\n- `default`: The default value to export if no frontmatter data is found. (Default: `undefined`).\n- `name`: The identifier name of the variable the frontmatter data is assigned to. (Default:\n  `frontmatter`).\n- `parsers`: A mapping A mapping of node types to parsers. Each key represents a frontmatter node\n  type. The value is a function that accepts the frontmatter data as a string, and returns the\n  parsed data. By default `yaml` nodes will be parsed using [`yaml`](https://github.com/eemeli/yaml)\n  and `toml` nodes using [`toml`](https://github.com/BinaryMuse/toml-node).\n\nIn addition it supports `unist-util-mdx-define`\n[options](https://github.com/remcohaszing/unist-util-mdx-define#options).\n\n## Compatibility\n\nThis project is compatible with Node.js 18 or greater.\n\n## License\n\n[MIT](LICENSE.md) © [Remco Haszing](https://github.com/remcohaszing)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremcohaszing%2Fremark-mdx-frontmatter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fremcohaszing%2Fremark-mdx-frontmatter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremcohaszing%2Fremark-mdx-frontmatter/lists"}