vuepress-plugin-code-preview

A vuepress plugin for codesandbox embed code preview

Usage no npm install needed!

<script type="module">
  import vuepressPluginCodePreview from 'https://cdn.skypack.dev/vuepress-plugin-code-preview';
</script>

README

vuepress-plugin-code-preview

A vuepress plugin for codesandbox embed code preview

npm GitHub stars](https://github.com/vxhly/vuepress-plugin-code-preview/stargazers) GitHub license

Install

# install dependencies
npm i vuepress-plugin-code-preview -D

# or use yarn
yarn add vuepress-plugin-code-preview -D

Usage

Write vuepress config

module.exports = {
  plugins: ['code-preview']
}

Write article

<code-preview embed-url="<url>" />

Options

embedUrl

Copy codesandbox embed url to it.

  • type: String
  • required: true
  • default: null

embedBox

Code embedding platform.

  • type: String
  • required: fasle
  • default: codesandbox

License

MIT.