🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

vitepress-plugin-runcode

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vitepress-plugin-runcode

Victor Bo's Vitepress Plugins RunCode.

latest
npmnpm
Version
0.3.4
Version published
Maintainers
1
Created
Source

vitepress-plugin-runcode

A vitepress plugin that run js code in markdown.

version

Install

npm install vitepress-plugin-runcode

Usage

In .vitepress/theme/index.ts

import RunCode from 'vitepress-plugin-runcode'
// css
import 'vitepress-plugin-runcode/styles.css'

export default {
  enhanceApp({ app }) {
    app.use(RunCode)
  }
}

In your markdown

<RunCode>

```js
const num1 = 8;
const num2 = 10;

console.log(num1 + num2)
```

</RunCode>

Keywords

vitepress

FAQs

Package last updated on 27 Mar 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts