Skip to content

Support some shortcut commands such as pm-install to generate code-group conveniently! #3616

@peterroe

Description

@peterroe

Is your feature request related to a problem? Please describe.

When I write some document with vitepress, I usually need to write the following code:

::: code-group

```sh [npm]
$ npm add -D cli-tool
```

```sh [pnpm]
$ pnpm add -D cli-tool
```

```sh [yarn]
$ yarn add -D cli-tool
```

```sh [bun]
$ bun add -D cli-tool
```

:::

Maybe we can provide a shortcut command like this:

:pm-install{name="cli-tool"}

And even more:

:pm-run{script="dev"}

:pm-x{command="cli-tool init"}

To generate the code in build time. And even with icon

Describe the solution you'd like

Like this link: https://undocs.pages.dev/guide/components#package-manager

Describe alternatives you've considered

No response

Additional context

If the request is granted, I'd be happy to design a detailed plan and start a PR

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions