{"id":20853933,"url":"https://github.com/landakram/remark-parse-yaml","last_synced_at":"2025-05-12T05:31:48.169Z","repository":{"id":57352997,"uuid":"115282190","full_name":"landakram/remark-parse-yaml","owner":"landakram","description":"Parse YAML blocks into structured data.","archived":false,"fork":false,"pushed_at":"2019-07-28T18:41:36.000Z","size":5,"stargazers_count":14,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-16T02:56:50.482Z","etag":null,"topics":["remark","remark-plugin","yaml","yaml-frontmatter"],"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/landakram.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-12-24T19:03:29.000Z","updated_at":"2024-04-08T15:51:20.000Z","dependencies_parsed_at":"2022-08-29T17:20:56.363Z","dependency_job_id":null,"html_url":"https://github.com/landakram/remark-parse-yaml","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/landakram%2Fremark-parse-yaml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/landakram%2Fremark-parse-yaml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/landakram%2Fremark-parse-yaml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/landakram%2Fremark-parse-yaml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/landakram","download_url":"https://codeload.github.com/landakram/remark-parse-yaml/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253682317,"owners_count":21946913,"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":["remark","remark-plugin","yaml","yaml-frontmatter"],"created_at":"2024-11-18T03:23:48.859Z","updated_at":"2025-05-12T05:31:47.902Z","avatar_url":"https://github.com/landakram.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# remark-parse-yaml\n[![npm version](https://badge.fury.io/js/remark-parse-yaml.svg)](https://badge.fury.io/js/remark-parse-yaml) [![Build Status](https://travis-ci.org/landakram/remark-parse-yaml.svg?branch=master)](https://travis-ci.org/landakram/remark-parse-yaml)\n\nThis [remark](https://github.com/wooorm/remark) plugin takes markdown with yaml frontmatter and parses the yaml into an object.\n\n## Usage\n\n```javascript\nconst unified = require('unified')\nconst markdown = require('remark-parse')\nconst frontmatter = require('remark-frontmatter')\nconst parseFrontmatter = require('remark-parse-yaml');\n\nlet processor = unified()\n    .use(markdown)\n    .use(frontmatter)\n    .use(parseFrontmatter)\n```\n\nWhen the processor is run, `yaml` nodes will now have an additional key, `parsedValue`, \nattached to its `data` key.\n\nSay that we have this markdown string:\n\n``` markdown\n---\nmetadata: this is metadata\ntags:\n    - one\n    - two\n---\n\n# Heading \n```\n\nWhen parsed, this will produce a `yaml` node with a `data` object that looks like this:\n\n```javascript\ndata: {\n    parsedValue: {\n        metadata: \"this is metadata\",\n        tags: [\"one\", \"two\"]\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flandakram%2Fremark-parse-yaml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flandakram%2Fremark-parse-yaml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flandakram%2Fremark-parse-yaml/lists"}