{"id":13483345,"url":"https://github.com/remarkjs/remark-yaml-config","last_synced_at":"2025-12-12T03:06:24.847Z","repository":{"id":29497795,"uuid":"33035613","full_name":"remarkjs/remark-yaml-config","owner":"remarkjs","description":"plugin to configure remark with YAML frontmatter","archived":false,"fork":false,"pushed_at":"2023-09-22T12:44:56.000Z","size":326,"stargazers_count":8,"open_issues_count":0,"forks_count":8,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-04-11T22:07:57.741Z","etag":null,"topics":["config","markdown","remark","remark-plugin","yaml"],"latest_commit_sha":null,"homepage":"https://remark.js.org","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/remarkjs.png","metadata":{"funding":{"github":"unifiedjs","open_collective":"unified"},"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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-03-28T14:06:07.000Z","updated_at":"2024-08-13T12:14:57.000Z","dependencies_parsed_at":"2024-01-13T18:24:00.256Z","dependency_job_id":"31475a93-6bea-41e7-8e80-be2024a85f13","html_url":"https://github.com/remarkjs/remark-yaml-config","commit_stats":{"total_commits":139,"total_committers":2,"mean_commits":69.5,"dds":"0.014388489208633115","last_synced_commit":"3431b5ddb8e49274af1a74561112c1da40e33893"},"previous_names":["wooorm/mdast-yaml-config"],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remarkjs%2Fremark-yaml-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remarkjs%2Fremark-yaml-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remarkjs%2Fremark-yaml-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remarkjs%2Fremark-yaml-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/remarkjs","download_url":"https://codeload.github.com/remarkjs/remark-yaml-config/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248487713,"owners_count":21112191,"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":["config","markdown","remark","remark-plugin","yaml"],"created_at":"2024-07-31T17:01:10.294Z","updated_at":"2025-12-12T03:06:24.559Z","avatar_url":"https://github.com/remarkjs.png","language":"JavaScript","funding_links":["https://github.com/sponsors/unifiedjs","https://opencollective.com/unified"],"categories":["JavaScript"],"sub_categories":[],"readme":"# remark-yaml-config\n\n[![Build][build-badge]][build]\n[![Coverage][coverage-badge]][coverage]\n[![Downloads][downloads-badge]][downloads]\n[![Size][size-badge]][size]\n[![Sponsors][sponsors-badge]][collective]\n[![Backers][backers-badge]][collective]\n[![Chat][chat-badge]][chat]\n\n**[remark][]** plugin to configure it with YAML frontmatter.\n\n## Contents\n\n*   [What is this?](#what-is-this)\n*   [When should I use this?](#when-should-i-use-this)\n*   [Install](#install)\n*   [Use](#use)\n*   [API](#api)\n    *   [`unified().use(remarkYamlConfig)`](#unifieduseremarkyamlconfig)\n*   [Types](#types)\n*   [Compatibility](#compatibility)\n*   [Security](#security)\n*   [Related](#related)\n*   [Contribute](#contribute)\n*   [License](#license)\n\n## What is this?\n\nThis package is a [unified][] ([remark][]) plugin to configure remark\n(specifically, how `remark-stringify` formats markdown) from YAML frontmatter.\n\n## When should I use this?\n\nThis project is useful when you want to change how markdown is formatted from\nwithin a file.\nYou can use this when you trust authors and want to give them control.\n\nThis plugin is very similar to the alternative\n[`remark-comment-config`][remark-comment-config].\nThe difference is that that plugin uses comments, which can come anywhere in the\ndocument, whereas this plugin uses YAML frontmatter, which comes at the start of\ndocuments.\n\n## Install\n\nThis package is [ESM only][esm].\nIn Node.js (version 16+), install with [npm][]:\n\n```sh\nnpm install remark-yaml-config\n```\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```js\nimport remarkYamlConfig from 'https://esm.sh/remark-yaml-config@7'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n\u003cscript type=\"module\"\u003e\n  import remarkYamlConfig from 'https://esm.sh/remark-yaml-config@7?bundle'\n\u003c/script\u003e\n```\n\n## Use\n\nSay we have the following file `example.md`:\n\n```markdown\n---\nremark:\n  bullet: \"+\"\n---\n\n- Triton\n```\n\n…and a module `example.js`:\n\n```js\nimport {remark} from 'remark'\nimport remarkFrontmatter from 'remark-frontmatter'\nimport remarkYamlConfig from 'remark-yaml-config'\nimport {read} from 'to-vfile'\n\nconst file = await remark()\n  .use(remarkFrontmatter)\n  .use(remarkYamlConfig)\n  .process(await read('example.md'))\n\nconsole.log(String(file))\n```\n\n\u003e ⚠️ **Important**: [`remark-frontmatter`][remark-frontmatter] is needed to\n\u003e support YAML frontmatter in markdown.\n\n…then running `node example.js` yields:\n\n```markdown\n---\nremark:\n  bullet: \"+\"\n---\n\n+ Triton\n```\n\n## API\n\nThis package exports no identifiers.\nThe default export is [`remarkYamlConfig`][api-remark-yaml-config].\n\n### `unified().use(remarkYamlConfig)`\n\nConfigure remark with YAML frontmatter.\n\nParses YAML frontmatter and takes the value of the `remark` field as settings.\nThe settings are passed to [`remark-stringify`][remark-stringify-options].\n\n###### Parameters\n\nThere are no parameters.\n\n###### Returns\n\nNothing (`undefined`).\n\n## Types\n\nThis package is fully typed with [TypeScript][].\nIt exports no additional types.\n\n## Compatibility\n\nProjects maintained by the unified collective are compatible with maintained\nversions of Node.js.\n\nWhen we cut a new major release, we drop support for unmaintained versions of\nNode.\nThis means we try to keep the current release line, `remark-yaml-config@^7`,\ncompatible with Node.js 16.\n\nThis plugin works with `remark` version 13+.\nVersion 5 (and lower) worked with older versions of remark.\n\n## Security\n\nUse of `remark-yaml-config` can change how markdown is parsed or compiled.\nIf the markdown is user provided, this may open you up to a\n[cross-site scripting (XSS)][wiki-xss] attack.\n\n## Related\n\n*   [`remark-frontmatter`][remark-frontmatter]\n    — support frontmatter (YAML, TOML, and more)\n*   [`remark-comment-config`][remark-comment-config]\n    — configure remark with comments\n\n## Contribute\n\nSee [`contributing.md`][contributing] in [`remarkjs/.github`][health] for ways\nto get started.\nSee [`support.md`][support] for ways to get help.\n\nThis project has a [code of conduct][coc].\nBy interacting with this repository, organization, or community you agree to\nabide by its terms.\n\n## License\n\n[MIT][license] © [Titus Wormer][author]\n\n\u003c!-- Definitions --\u003e\n\n[build-badge]: https://github.com/remarkjs/remark-yaml-config/workflows/main/badge.svg\n\n[build]: https://github.com/remarkjs/remark-yaml-config/actions\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/remarkjs/remark-yaml-config.svg\n\n[coverage]: https://codecov.io/github/remarkjs/remark-yaml-config\n\n[downloads-badge]: https://img.shields.io/npm/dm/remark-yaml-config.svg\n\n[downloads]: https://www.npmjs.com/package/remark-yaml-config\n\n[size-badge]: https://img.shields.io/bundlejs/size/remark-yaml-config\n\n[size]: https://bundlejs.com/?q=remark-yaml-config\n\n[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg\n\n[backers-badge]: https://opencollective.com/unified/backers/badge.svg\n\n[collective]: https://opencollective.com/unified\n\n[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg\n\n[chat]: https://github.com/remarkjs/remark/discussions\n\n[npm]: https://docs.npmjs.com/cli/install\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[esmsh]: https://esm.sh\n\n[health]: https://github.com/remarkjs/.github\n\n[contributing]: https://github.com/remarkjs/.github/blob/main/contributing.md\n\n[support]: https://github.com/remarkjs/.github/blob/main/support.md\n\n[coc]: https://github.com/remarkjs/.github/blob/main/code-of-conduct.md\n\n[license]: license\n\n[author]: https://wooorm.com\n\n[remark]: https://github.com/remarkjs/remark\n\n[remark-frontmatter]: https://github.com/remarkjs/remark-frontmatter\n\n[remark-comment-config]: https://github.com/remarkjs/remark-comment-config\n\n[remark-stringify-options]: https://github.com/remarkjs/remark/blob/main/packages/remark-stringify/readme.md#options\n\n[typescript]: https://www.typescriptlang.org\n\n[unified]: https://github.com/unifiedjs/unified\n\n[wiki-xss]: https://en.wikipedia.org/wiki/Cross-site_scripting\n\n[api-remark-yaml-config]: #unifieduseremarkyamlconfig\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremarkjs%2Fremark-yaml-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fremarkjs%2Fremark-yaml-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremarkjs%2Fremark-yaml-config/lists"}