Skip to content

Commit

Permalink
docs: add getting-started carousel (#3613)
Browse files Browse the repository at this point in the history
* docs: add getting-started carousel

* update

* update

* update
  • Loading branch information
hverlin authored Dec 16, 2024
1 parent 2d9d289 commit 949a3fc
Show file tree
Hide file tree
Showing 6 changed files with 124 additions and 16 deletions.
2 changes: 2 additions & 0 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
groupIconMdPlugin,
groupIconVitePlugin,
} from "vitepress-plugin-group-icons";
import { tabsMarkdownPlugin } from "vitepress-plugin-tabs";

// https://vitepress.dev/reference/site-config
export default defineConfig({
Expand Down Expand Up @@ -179,6 +180,7 @@ export default defineConfig({
markdown: {
config(md) {
md.use(groupIconMdPlugin);
md.use(tabsMarkdownPlugin);
},
},
vite: {
Expand Down
11 changes: 9 additions & 2 deletions docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
import Theme from "vitepress/theme";
import type { Theme } from "vitepress";
import DefaultTheme from "vitepress/theme";
import { enhanceAppWithTabs } from "vitepress-plugin-tabs/client";
import "virtual:group-icons.css";

export default Theme;
export default {
extends: DefaultTheme,
enhanceApp({ app }) {
enhanceAppWithTabs(app);
},
} satisfies Theme;
Binary file modified docs/bun.lockb
Binary file not shown.
106 changes: 98 additions & 8 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ This will show you how to install mise and get started with it. This is a suitab

## 1. Install `mise` CLI

See [installing mise](/installing-mise) for other ways to install mise (`apt`, `yum`, `nix`, etc.).
See [installing mise](/installing-mise) for other ways to install mise (`macport`, `apt`, `yum`, `nix`, etc.).

:::tabs key:installing-mise
== Linux/macOS

```shell
curl https://mise.run | sh
Expand All @@ -18,13 +21,54 @@ You can verify the installation by running:
# mise 2024.x.x
```

::: info

- `~/.local/bin` does not need to be in `PATH`. mise will automatically add its own directory to `PATH`
when activated.
- mise respects [`MISE_DATA_DIR`](/configuration) and [`XDG_DATA_HOME`](/configuration) if you'd like
to change these locations.
:::

== Brew
Using [brew](https://brew.sh/) package manager

```shell
brew install mise
```

== Windows
::: code-group

```shell [winget]
winget install jdx.mise
```

```shell [scoop]
scoop install mise
```

== Debian/Ubuntu (apt)

For installation on Ubuntu/Debian:

::: code-group

```sh [amd64]
sudo apt update -y && sudo apt install -y gpg sudo wget curl
sudo install -dm 755 /etc/apt/keyrings
wget -qO - https://mise.jdx.dev/gpg-key.pub | gpg --dearmor | sudo tee /etc/apt/keyrings/mise-archive-keyring.gpg 1> /dev/null
echo "deb [signed-by=/etc/apt/keyrings/mise-archive-keyring.gpg arch=amd64] https://mise.jdx.dev/deb stable main" | sudo tee /etc/apt/sources.list.d/mise.list
sudo apt update
sudo apt install -y mise
```

```sh [arm64]
sudo apt update -y && apt install -y gpg sudo wget curl
sudo install -dm 755 /etc/apt/keyrings
wget -qO - https://mise.jdx.dev/gpg-key.pub | gpg --dearmor | sudo tee /etc/apt/keyrings/mise-archive-keyring.gpg 1> /dev/null
echo "deb [signed-by=/etc/apt/keyrings/mise-archive-keyring.gpg arch=arm64] https://mise.jdx.dev/deb stable main" | sudo tee /etc/apt/sources.list.d/mise.list
sudo apt update
sudo apt install -y mise
```

:::

## 2. Activate `mise`

Expand All @@ -36,10 +80,9 @@ Now that `mise` is installed, you can optionally activate it or add its [shims](
For interactive shells, `mise activate` is recommended. In non-interactive sessions, like CI/CD, IDEs, and scripts, using `shims` might work best. You can also not use any and call `mise exec/run` directly instead.
See [this guide](dev-tools/shims.md) for more information.

:::info
Activation may be handled automatically if you use fish shell and installed via homebrew. This
can be disabled with `set -Ux MISE_FISH_AUTO_ACTIVATE 0`.
:::
:::tabs key:installing-mise

== Linux/macOS

::: code-group

Expand All @@ -62,6 +105,53 @@ echo '~/.local/bin/mise activate fish | source' >> ~/.config/fish/config.fish
default. If you've
installed mise by some other means it may be on `PATH` or somewhere different.

== Brew

::: code-group

```sh [bash]
echo 'eval "$(/opt/homebrew/bin/mise activate bash)"' >> ~/.bashrc
```

```sh [zsh]
echo 'eval "$(/opt/homebrew/bin/mise activate zsh)"' >> ~/.zshrc
```

- Activation will be handled automatically if you use `fish` shell and installed via `homebrew`. This can be disabled with `set -Ux MISE_FISH_AUTO_ACTIVATE 0`.
- Make sure you restart your shell session after modifying your rc file in order for it to take effect.-

== Windows

Only shims are supported for now on Windows.

- When using `scoop`, the shims are automatically added to your `PATH`.
- With `winget`, Add this directory to PATH: `<homedir>\AppData\Local\mise\shims`.

```powershell
$shimPath = "$env:USERPROFILE\AppData\Local\mise\shims"
$currentPath = [Environment]::GetEnvironmentVariable('Path', 'User')
$newPath = $currentPath + ";" + $shimPath
[Environment]::SetEnvironmentVariable('Path', $newPath, 'User')
```

== Debian/Ubuntu (apt)

::: code-group

```sh [bash]
echo 'eval "$(mise activate bash)"' >> ~/.bashrc
```

```sh [zsh]
echo 'eval "$(mise activate zsh)"' >> ~/.zshrc
```

```sh [fish]
echo 'mise activate fish | source' >> ~/.config/fish/config.fish
```

:::

## 3. Using `mise`

:::info
Expand Down
18 changes: 13 additions & 5 deletions docs/installing-mise.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ sudo apt install -y mise
```

```sh [arm64]
apt update -y && apt install -y gpg sudo wget curl
sudo apt update -y && apt install -y gpg sudo wget curl
sudo install -dm 755 /etc/apt/keyrings
wget -qO - https://mise.jdx.dev/gpg-key.pub | gpg --dearmor | sudo tee /etc/apt/keyrings/mise-archive-keyring.gpg 1> /dev/null
echo "deb [signed-by=/etc/apt/keyrings/mise-archive-keyring.gpg arch=arm64] https://mise.jdx.dev/deb stable main" | sudo tee /etc/apt/sources.list.d/mise.list
Expand Down Expand Up @@ -237,16 +237,20 @@ This is the recommended way to install mise on Windows. It will automatically ad
scoop install mise
```

### Windows - Chocolatey
### Windows - winget

```sh
choco install mise
winget install jdx.mise
```

### Windows - WinGet
### Windows - Chocolatey

::: info
chocolatey version is currently outdated.
:::

```sh
winget install mise
choco install mise
```

### Windows - manual
Expand Down Expand Up @@ -356,6 +360,10 @@ I'd be happy to help you get yours integrated.

## Autocompletion

::: tip
Some installation methods automatically install autocompletion scripts.
:::

The [`mise completion`](/cli/completion.html) command can generate autocompletion scripts for your shell.
This requires `usage` to be installed. If you don't have it, install it with:

Expand Down
3 changes: 2 additions & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"@types/markdown-it": "^14.1.2",
"markdown-it": "^14.1.0",
"toml": "^3.0.0",
"vitepress-plugin-group-icons": "^1.3.1"
"vitepress-plugin-group-icons": "^1.3.1",
"vitepress-plugin-tabs": "^0.5.0"
}
}

0 comments on commit 949a3fc

Please sign in to comment.