{"id":15067468,"url":"https://github.com/medfreeman/remark-vue","last_synced_at":"2025-10-05T05:30:20.389Z","repository":{"id":57353046,"uuid":"92044972","full_name":"medfreeman/remark-vue","owner":"medfreeman","description":"Compile Markdown to Vue with remark","archived":false,"fork":true,"pushed_at":"2020-06-03T09:19:38.000Z","size":1229,"stargazers_count":15,"open_issues_count":24,"forks_count":1,"subscribers_count":3,"default_branch":"vuejs","last_synced_at":"2024-11-30T05:24:40.694Z","etag":null,"topics":["compile","html","markdown","remark","stringify","vuejs2"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"remarkjs/remark-react","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/medfreeman.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}},"created_at":"2017-05-22T11:13:20.000Z","updated_at":"2024-09-12T13:56:23.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/medfreeman/remark-vue","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/medfreeman%2Fremark-vue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/medfreeman%2Fremark-vue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/medfreeman%2Fremark-vue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/medfreeman%2Fremark-vue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/medfreeman","download_url":"https://codeload.github.com/medfreeman/remark-vue/tar.gz/refs/heads/vuejs","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235365076,"owners_count":18978295,"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":["compile","html","markdown","remark","stringify","vuejs2"],"created_at":"2024-09-25T01:24:19.344Z","updated_at":"2025-10-05T05:30:20.021Z","avatar_url":"https://github.com/medfreeman.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# remark-vue\n\n[![npm version](https://badgen.net/npm/v/remark-vue)](https://www.npmjs.com/package/remark-vue)\n[![npm](https://badgen.net/npm/dt/remark-vue)](https://npmjs.com/package/remark-vue)\n[![Build Status](https://badgen.net/circleci/github/medfreeman/remark-vue/vuejs)](https://circleci.com/gh/medfreeman/remark-vue)\n[![Codecov](https://badgen.net/codecov/c/github/medfreeman/remark-vue/vuejs)](https://codecov.io/gh/medfreeman/remark-vue/branch/vuejs)\n[![Greenkeeper badge](https://badges.greenkeeper.io/medfreeman/remark-vue.svg)](https://greenkeeper.io/)\n[![Dependencies](https://badgen.net/david/dep/medfreeman/remark-vue)](https://david-dm.org/medfreeman/remark-vue)\n[![devDependencies](https://badgen.net/david/dev/medfreeman/remark-vue)](https://david-dm.org/medfreeman/remark-vue?type=dev)\n\n\u003e Compile Markdown to Vue with remark\n\n[📖 **Release Notes**](./CHANGELOG.md)\n\n## Features\n\n**remark-vue** compiles markdown to Vue.  Built on [**remark**](https://github.com/remarkjs/remark),\nan extensively tested and pluggable parser.\n\n**Why?** Using `domPropsInnerHTML` in\n[Vue.js](https://vuejs.org/) is a common cause of [XSS](https://en.wikipedia.org/wiki/Cross-site_scripting)\nattacks: user input can include script tags and other kinds of active\ncontent that reaches across domains and harms security. remark-vue\nbuilds a DOM in Vue, using [Vue createElement](https://vuejs.org/v2/guide/render-function.html#Nodes-Trees-and-the-Virtual-DOM):\nthis means that you can display parsed \u0026 formatted Markdown content\nin an application without using `domPropsInnerHTML`.\n\n## Installation\n\n[npm](https://docs.npmjs.com/cli/install):\n\n```bash\nnpm install remark-vue\n```\n\n## Table of Contents\n\n*   [Programmatic](#programmatic)\n\n    *   [remark.use(vue, options)](#remarkusevue-options)\n\n*   [Configuration](#configuration)\n\n*   [Integrations](#integrations)\n\n*   [License](#license)\n\n## Programmatic\n\n### [remark](https://github.com/wooorm/remark#api).[use](https://github.com/wooorm/remark#remarkuseplugin-options)(vue, [options](#configuration))\n\n**Parameters**\n\n*   `vue` — This plugin;\n*   `options` (`Object?`) — See [below](#configuration).\n\nLet’s say `example.js` looks as follows:\n\n```js\nvar Vue = require('vue'),\n    remark = require('remark'),\n    vueRenderer = require('remark-vue');\n\nvar App = new Vue({\n  el: '#app',\n  data: function () {\n    return {\n      text: '# hello world'\n    }\n  },\n  onChange(e) {\n    this.text = e.target.value;\n  },\n  render() {\n    return (\u003cdiv\u003e\n      \u003ctextarea\n        value={this.text}\n        v-on:change={this.onChange} /\u003e\n      \u003cdiv id='preview'\u003e\n        { remark().use(vueRenderer).processSync(this.text).contents }\n      \u003c/div\u003e\n    \u003c/div\u003e);\n  }\n});\n```\n\n## Configuration\n\nAll options, including the `options` object itself, are optional:\n\n*   `sanitize` (`object` or `boolean`, default: `undefined`)\n    — Sanitation schema to use. Passed to\n    [hast-util-sanitize](https://github.com/wooorm/hast-util-sanitize).\n    The default schema, if none or `true` is passed, adheres to GitHub’s\n    sanitation rules.\n\n    **This means that non-standard HAST nodes and many\n    HTML elements are *by default* santized out.** If you want to be more\n    permissive, you should provide a value for `sanitize`.\n\n    If `false` is passed, it does not sanitize input.\n\n*   `prefix` (`string`, default: `''`)\n    — Vue key.\n\n*   `Vue` (`Function`, default: `require('vue')`)\n    — Global Vue constructor.\n\n*   `remarkVueComponents` (`object`, default: `undefined`)\n    — Provides a way to override default elements (`\u003ca\u003e`, `\u003cp\u003e`, etc)\n    by defining an object comprised of `element: Component` key-value\n    pairs. For example, to output `\u003cMyLink\u003e` components instead of\n    `\u003ca\u003e`, and `\u003cMyParagraph\u003e` instead of `\u003cp\u003e`:\n\n    ```js\n    remarkVueComponents: {\n      a: MyLink,\n      p: MyParagraph\n    }\n    ```\n\n*   `toHast` (`object`, default: `{}`)\n    — Provides options for transforming MDAST document to HAST.\n    See [mdast-util-to-hast](https://github.com/wooorm/mdast-util-to-hast#api)\n    for settings.\n\nThese can passed to `remark.use()` as a second argument.\n\n## Integrations\n\n**remark-vue** works great with:\n\n*   [**remark-toc**](https://github.com/wooorm/remark-toc), which generates\n    tables of contents;\n\n*   [**remark-github**](https://github.com/wooorm/remark-github), which\n    generates references to GitHub issues, PRs, users, and more;\n\n*   ...and [more](https://github.com/wooorm/remark/blob/master/doc/plugins.md#list-of-plugins).\n\nAll [**remark** nodes](https://github.com/wooorm/mdast)\ncan be compiled to HTML.\n\nIn addition, **remark-vue** looks for an\n`attributes` object on each node it compiles and adds the found properties\nas HTML attributes on the compiled tag.\n\n## CONTRIBUTING\n\n* ⇄ Pull requests and ★ Stars are always welcome.\n* For bugs and feature requests, please create an issue.\n* Pull requests must be accompanied by passing automated tests (`$ yarn test`).\n\n## License\n\n[MIT](LICENSE) © [Titus Wormer](http://wooorm.com), modified by [Tom MacWright](http://www.macwright.org/), [Mapbox](https://www.mapbox.com/).\n\nForked by [Med_freeman](https://medfreeman.io) to `remark-vue`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmedfreeman%2Fremark-vue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmedfreeman%2Fremark-vue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmedfreeman%2Fremark-vue/lists"}