Skip to content

[docs] package manager run commands plugin #169

@nickfrosty

Description

@nickfrosty

the gill docs use the Fumadocs framework (which is amazing!). Fumadocs provides a rehype plugin to easily created "package install" tabs to show the install command for multiple package install commands, which has the following syntax in markdown:

```package-install
gill
```

but fumadocs does not currently have a similar plugin for package manager run commands. we should create one and them also upstream it to fumadocs too :) this will be useful for code snippets like the codama run command

the syntax could look something like this:

```package-execute
codama run js
```

which should provide tabs with shell commands of:

  • npm: npx codama run js
  • pnpm: pnpm codama run js
  • etc:

considerations: npx and pnpm will attempt to run the local binary (if one is found) but npx will also attempt to fetch the named package from the registry, whereas pnpx is the equivalent for pnpm. so we might need to create two different plugins/syntax for rehype to key on (e.g. package-execute vs package-run), see this stack overflow post.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions