codehike icon indicating copy to clipboard operation
codehike copied to clipboard

Better support for terminal

Open pomber opened this issue 3 years ago • 2 comments

Most docs start with some commands you need to run on a terminal.

For example, one common use case for web projects is to show options for npm/yarn/pnpm. Maybe code hike should make that use case easier.

There's also the styling of commands and output. Here the important part is yarn start, the other lines are extra context:

```terminal
$ yarn start
[INFO] Starting the development server...
[SUCCESS] Website is running at: http://localhost:3000/
```

pomber avatar Jun 21 '22 11:06 pomber

show options for npm/yarn/pnpm

i've been wondering if CH can do this a la docusaurus, and if this could open the door to more "choose your adventure" kinds of features

DanielFGray avatar Aug 28 '24 16:08 DanielFGray

i've been wondering if CH can do this a la docusaurus, and if this could open the door to more "choose your adventure" kinds of features

Yes, it's doable right now. You can do something similar to this language switcher example. Since you own the <Code> component you can implement it any way you want.

pomber avatar Aug 28 '24 16:08 pomber