{"id":16318042,"url":"https://github.com/willviles/broccoli-markdown-resolver","last_synced_at":"2025-03-22T21:31:41.594Z","repository":{"id":70631425,"uuid":"103294682","full_name":"willviles/broccoli-markdown-resolver","owner":"willviles","description":"Broccoli plugin to recursively resolve .md files to a nested tree with parsing of content and frontmatter.","archived":false,"fork":false,"pushed_at":"2019-01-31T17:42:47.000Z","size":22,"stargazers_count":3,"open_issues_count":4,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T14:53:50.294Z","etag":null,"topics":["broccoli","broccoli-plugin","frontmatter","markdown","resolver"],"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/willviles.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-12T16:24:09.000Z","updated_at":"2023-09-08T17:29:52.000Z","dependencies_parsed_at":"2023-02-21T14:30:50.304Z","dependency_job_id":null,"html_url":"https://github.com/willviles/broccoli-markdown-resolver","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"625cffdc4b85dca87cb1d4207d543f97fab3fef0"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willviles%2Fbroccoli-markdown-resolver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willviles%2Fbroccoli-markdown-resolver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willviles%2Fbroccoli-markdown-resolver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willviles%2Fbroccoli-markdown-resolver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/willviles","download_url":"https://codeload.github.com/willviles/broccoli-markdown-resolver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245022585,"owners_count":20548563,"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":["broccoli","broccoli-plugin","frontmatter","markdown","resolver"],"created_at":"2024-10-10T22:09:49.268Z","updated_at":"2025-03-22T21:31:41.217Z","avatar_url":"https://github.com/willviles.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Broccoli Markdown Resolver\n======\n\n[![Build Status](https://travis-ci.org/willviles/broccoli-markdown-resolver.svg)](https://travis-ci.org/willviles/broccoli-markdown-resolver) ![Download count all time](https://img.shields.io/npm/dt/broccoli-markdown-resolver.svg) [![npm](https://img.shields.io/npm/v/broccoli-markdown-resolver.svg)](https://www.npmjs.com/package/broccoli-markdown-resolver)\n\nGiven an input node, Broccoli Markdown Resolver outputs a file exporting data for our .md files, with content and frontmatter parsed automatically.\n\n## Installation\n```\nyarn add broccoli-markdown-resolver\n```\n\n## Usage\n\nConsider the following folder structure inside our `inputNode`.\n\n```shell\n.\n├── quick-start.md\n├── sdks.md\n└── sdks/\n    └── node-js.md\n```\n\nRun the resolver and choose an output destination.\n\n```js\nvar MarkdownResolver = require('broccoli-markdown-resolver');\n\nvar outputNode = new MarkdownResolver(inputNodes, {\n  outputFile: '/markdown-file-data.js'\n});\n```\n\n## Data\n\nRequire the data\n\n```js\nconst markdownData = require('./path/to/markdown-file-data');\n```\n\n### markdownData.trees\n\nReturns a tree of markdown data for each inputNode.\n\n```js\n{\n  \"path/to/input-node\": [\n    {\n      \"path\": \"path/to/input-node/quick-start\",\n      \"content\": \"\\nGet started quickly with Acme API.\\n\",\n      \"attributes\": {\n        \"title\": \"Quick Start\"\n      }\n    },\n    {\n      \"path\": \"path/to/input-node/sdks\",\n      \"children\": [\n        {\n          \"path\": \"path/to/input-node/sdks/node-js\",\n          \"content\": \"\\nAbout the Acme Node.js SDK.\\n\",\n          \"attributes\": {\n            \"title\": \"Node.js SDK\"\n          }\n        }\n      ],\n      \"content\": \"\\nAcme offer SDKs in many different languages.\\n\",\n      \"attributes\": {\n        \"title\": \"SDKs\",\n        \"custom-attr\": true\n      }\n    }\n  ]\n}\n```\n\n### markdownData.files\n\nReturns a list of all files in a flat object format.\n\n```js\n[\n  {\n    \"path\": \"path/to/input-node/quick-start\",\n    \"content\": \"\\nGet started quickly with Acme API.\\n\",\n    \"attributes\": {\n      \"title\": \"Quick Start\"\n    }\n  },\n  {\n    \"path\": \"path/to/input-node/sdks/node-js\",\n    \"content\": \"\\nAbout the Acme Node.js SDK.\\n\",\n    \"attributes\": {\n      \"title\": \"Node.js SDK\"\n    }\n  },\n  {\n    \"path\": \"path/to/input-node/sdks\",\n    \"children\": [\n      {\n        \"path\": \"path/to/input-node/sdks/node-js\",\n        \"content\": \"\\nAbout the Acme Node.js SDK.\\n\",\n        \"attributes\": {\n          \"title\": \"Node.js SDK\"\n        }\n      }\n    ],\n    \"content\": \"\\nAcme offer SDKs in many different languages.\\n\",\n    \"attributes\": {\n      \"title\": \"SDKs\",\n      \"custom-attr\": true\n    }\n  }\n]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillviles%2Fbroccoli-markdown-resolver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwillviles%2Fbroccoli-markdown-resolver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillviles%2Fbroccoli-markdown-resolver/lists"}