{"id":13670465,"url":"https://github.com/vuepress/vuepress-plugin-schema2md","last_synced_at":"2025-04-27T13:32:20.230Z","repository":{"id":66009269,"uuid":"245595241","full_name":"vuepress/vuepress-plugin-schema2md","owner":"vuepress","description":"A VuePress plugin to help you generate pages via JSON Schema (HMR ✅)","archived":true,"fork":false,"pushed_at":"2020-03-16T06:23:32.000Z","size":686,"stargazers_count":20,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-11T08:40:52.056Z","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/vuepress.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-03-07T08:28:17.000Z","updated_at":"2024-05-13T15:50:43.000Z","dependencies_parsed_at":"2024-01-14T16:17:54.361Z","dependency_job_id":"a456bf0b-86cc-46ac-850f-79a51cb731ed","html_url":"https://github.com/vuepress/vuepress-plugin-schema2md","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vuepress%2Fvuepress-plugin-schema2md","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vuepress%2Fvuepress-plugin-schema2md/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vuepress%2Fvuepress-plugin-schema2md/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vuepress%2Fvuepress-plugin-schema2md/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vuepress","download_url":"https://codeload.github.com/vuepress/vuepress-plugin-schema2md/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251145632,"owners_count":21543074,"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":[],"created_at":"2024-08-02T09:00:42.871Z","updated_at":"2025-04-27T13:32:18.940Z","avatar_url":"https://github.com/vuepress.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# vuepress-plugin-schema2md\n\n[![NPM version](https://img.shields.io/npm/v/vuepress-plugin-schema2md.svg?style=flat)](https://npmjs.com/package/vuepress-plugin-schema2md) [![NPM downloads](https://img.shields.io/npm/dm/vuepress-plugin-schema2md.svg?style=flat)](https://npmjs.com/package/vuepress-plugin-schema2md) ![Node.js CI](https://github.com/rich-lab/vuepress-plugin-schema2md/workflows/Node.js%20CI/badge.svg)\n\n## Feature\n\n- 📄 Generate dynamic VuePress pages from JSON Schemas.\n- ❤️ HMR Support!\n- 🎁 Support extra markdown file to be merged into final content.\n\n## Example\n\n![](./.media/demo.gif)\n\n\u003cp align=\"center\"\u003e\n  \u003csmall\u003e\u003ci\u003eTip. you can execute \u003ccode\u003enpm run docs:dev\u003c/code\u003e on thie repo to check out this example.\u003c/i\u003e\u003c/small\u003e\n\u003c/p\u003e\n\n\n## Install\n\n```bash\nyarn add vuepress-plugin-schema2md  -D \n# OR npm install vuepress-plugin-schema2md -D\n```\n\n## Usage\n\n```js\n// .vuepress/config.js\nmodule.exports = {\n  plugins: [\n    [\n      'schema2md', {\n        // Options\n      }\n    ]\n  ]\n}\n```\n\n## Options\n\n### pages\n\n- Type: `Record\u003cstring, ITransformOptions\u003e`\n- Description: describe the generated pages.\n\ne.g.\n\n```js\n// .vuepress/config.js\nmodule.exports = {\n  plugins: ['schema2md', {\n    pages: {\n      '/config/': {\n        schemaPath: '/path/to/your/schema.json'\n      }\n    }\n  }]\n}\n```\n\nThen you will get a dynamic page with route `/config/`, whose content is generated by [schema2md](https://github.com/rich-lab/schema2md) from `'/path/to/your/schema.json'`, \n\nFor typings of interface `ITransformOptions`, plead head [schema2md](https://github.com/rich-lab/schema2md).\n\n### cwd\n\n- Type: `string`\n- Description: Current working directory, used to calcaulate absolute path for \"schemaPath\" and \"outputPath\" with relative path, defaults to `process.cwd()`.\n\n### locale\n\n- Type: `string`\n- Description: Global locale.\n\n### write\n\n- Type: `boolean`\n- Description: whether to generate the markdown content to disk.\n\nIf you want to check out the generated markdown, you could do like this:\n\n```diff\n // .vuepress/config.js\n module.exports = {\n   plugins: ['schema2md', {\n+    write: true,\n     pages: {\n       '/config/': {\n         schemaPath: '/path/to/your/schema.json'\n+        outputPath: 'docs/config/README.md', // You shouldn't commit this file.\n       }\n     }\n   }]\n }\n```\n\n## Contributing\n\n1. Fork it!\n2. Create your feature branch: `git checkout -b my-new-feature`\n3. Commit your changes: `git commit -am 'Add some feature'`\n4. Push to the branch: `git push origin my-new-feature`\n5. Submit a pull request :D\n\n\n## Author\n\n**vuepress-plugin-schema2md** © [ULIVZ](https://github.com/ulivz), Released under the [MIT](./LICENSE) License.\u003cbr\u003e\n\n\n\u003e [github.com/ulivz](https://github.com/ulivz) · GitHub [@ULIVZ](https://github.com/ulivz) · Twitter [@_ulivz](https://twitter.com/_ulivz)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvuepress%2Fvuepress-plugin-schema2md","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvuepress%2Fvuepress-plugin-schema2md","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvuepress%2Fvuepress-plugin-schema2md/lists"}