{"id":16432643,"url":"https://github.com/2nthony/vuedown","last_synced_at":"2025-03-23T08:31:44.036Z","repository":{"id":44159228,"uuid":"147860506","full_name":"2nthony/vuedown","owner":"2nthony","description":"📝Convert markdown to Vue-component, a vmark alternative","archived":false,"fork":false,"pushed_at":"2023-12-15T11:44:22.000Z","size":761,"stargazers_count":7,"open_issues_count":9,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T18:58:01.806Z","etag":null,"topics":["it-just-works","markdown","markdown-parser","marked","simple","vmark","vue"],"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/2nthony.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":null,"patreon":"evillt","open_collective":null,"ko_fi":"evillt","tidelift":null,"custom":"https://donate.evila.me"}},"created_at":"2018-09-07T18:27:48.000Z","updated_at":"2022-04-16T00:23:44.000Z","dependencies_parsed_at":"2024-06-21T15:44:34.780Z","dependency_job_id":"1e263bab-8f46-4717-995e-983cecca2c2d","html_url":"https://github.com/2nthony/vuedown","commit_stats":null,"previous_names":["evillt/vuedown"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2nthony%2Fvuedown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2nthony%2Fvuedown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2nthony%2Fvuedown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2nthony%2Fvuedown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/2nthony","download_url":"https://codeload.github.com/2nthony/vuedown/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245078067,"owners_count":20557274,"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":["it-just-works","markdown","markdown-parser","marked","simple","vmark","vue"],"created_at":"2024-10-11T08:43:59.101Z","updated_at":"2025-03-23T08:31:43.668Z","avatar_url":"https://github.com/2nthony.png","language":"JavaScript","funding_links":["https://patreon.com/evillt","https://ko-fi.com/evillt","https://donate.evila.me"],"categories":[],"sub_categories":[],"readme":"# vuedown\n\n\u003e 📝Convert markdown to Vue-component\n\nPlease consider starring the project to show your ❤️ and support.\n\n\u003e **You can use the [@evillt/vuedown-loader](https://github.com/evillt/vuedown-loader) for webpack loader**  \n\u003e **You can use the [parcel-plugin-vuedown](https://github.com/evillt/parcel-plugin-vuedown) for parcel plugin**\n\n[![NPM version](https://badgen.net/npm/v/vuedown?icon=npm)](https://npmjs.com/package/vuedown)\n[![NPM download](https://badgen.net/npm/dm/vuedown?icon=npm)](https://npmjs.com/package/vuedown)\n[![CircleCI](https://badgen.net/circleci/github/evillt/vuedown?icon=circleci)](https://circleci.com/gh/evillt/vuedown/tree/master)\n[![License](https://badgen.net/npm/license/vuedown)](./LICENSE)\n[![donate](https://badgen.net/badge/support%20me/donate/f2a)](https://donate.evila.me)\n\nvuedown is very similar to [vmark](https://github.com/egoist/vmark), but with different tooling based on.\n\nvuedown(8kb) is 4 times smaller than vmark(30kb), because vmark use [saber-markdown(fork from markdown-it)](https://github.com/saberland/saber/tree/master/packages/saber-markdown) while vuedown use [marked(forked)](./lib/markdown/marked.js) under the hood.\n\n## Features\n\n- Support `@` in attribute names\n- ~~Convert link to `\u003crouter-link\u003e` by default~~\n- Support convert `\u003ca\u003e` to `\u003crouter-link\u003e`\n- Mini size\n\n## Install\n\n```console\nyarn add vuedown --dev\n```\n\n## Usage\n\nIn:\n\n```markdown\n# {{ title }}\n\n\u003e I'm a markdown file\n\n\u003cbutton @click=\"inc\"\u003eCount: {{ count }}\u003c/button\u003e\n\n\u003cscript\u003e\n  export default {\n    data() {\n      return {\n        title: 'Hello',\n        count: 0\n      }\n    },\n    methods: {\n      inc() {\n        this.count++\n      }\n    }\n  }\n\u003c/script\u003e\n```\n\nOut:\n\n```html\n\u003ctemplate\u003e\n  \u003cdiv class=\"vuedown\"\u003e\n    \u003ch1\u003e{{ title }}\u003c/h1\u003e\n\n    \u003cp\u003e\n      \u003cblockquote\u003eI'm a markdown file\u003c/blockquote\u003e\n    \u003c/p\u003e\n\n    \u003cp\u003e\n      \u003cbutton @click=\"inc\"\u003eCount: {{ count }}\u003c/button\u003e\n    \u003c/p\u003e\n  \u003c/div\u003e\n\u003c/template\u003e\n\n\u003cscript\u003e\n  export default {\n    data() {\n      return {\n        title: 'Hello',\n        count: 0\n      }\n    },\n    methods: {\n      inc() {\n        this.count++\n      }\n    }\n  }\n\u003c/script\u003e\n```\n\nCode:\n\n```js\nconst component = vuedown(input)\n// Get the component in Vue SFC format\n```\n\n## API\n\n### `vuedown(input, [options])`\n\n#### `input`\n\n- Type: `string`\n- Required: `true`\n\nThe markdown string.\n\n#### `options`\n\nOptions for [marked.options](https://marked.js.org/#/USING_ADVANCED.md#options).\n\n#### `options.routerLink`\n\n- Type: `boolean`\n- Default: `false`\n\nConvert `\u003ca\u003e` to `\u003crouter-link\u003e` but external link will always be `\u003ca target=\"_blank\"\u003e`.\n\n#### `options.wrapHTML`\n\n- Type: `(html: string) =\u003e string`\n- Default: \u003ccode\u003ehtml =\u003e \u0026#x60;\u0026lt;div class=\"vuedown\"\u0026gt;\\${html}\u0026lt;/div\u0026gt;\u0026#x60;\u003c/code\u003e\n\nWrap the HTML in an element.\n\n#### `options.extendMarkedRenderer`\n\n- Type: `(renderer: marked.Renderer) =\u003e void`\n\nYou can modify the [marked renderer](https://marked.js.org/#/USING_PRO.md#renderer) we use.\n\n#### `options.imageLazyLoading`\n\n- Type: `boolean`\n\nSupport chrome 75's native image lazy loading.\n\n### `vuedown.marked: marked`\n\n[marked](https://marked.js.org)\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## Author\n\n**vuedown** © [evillt](https://github.com/evillt), Released under the [MIT](./LICENSE) License.\n\nAuthored and maintained by **EVILLT** with help from contributors ([list](https://github.com/evillt/vuedown/contributors)).\n\n\u003e [evila.me](https://evila.me) · GitHub [@evillt](https://github.com/evillt) · Twitter [@evillt](https://twitter.com/evillt)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2nthony%2Fvuedown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F2nthony%2Fvuedown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2nthony%2Fvuedown/lists"}