Skip to content

Commit 8fa598a

Browse files
committed
Add details shortcode
1 parent 2f70099 commit 8fa598a

File tree

4 files changed

+35
-30
lines changed

4 files changed

+35
-30
lines changed

website/content/setup/index.md

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,16 @@ title = "Setup"
66

77
## Installing Rust
88

9-
Before installing Rustlings, you need to have the **latest version of Rust** installed.
10-
Visit [www.rust-lang.org/tools/install](https://www.rust-lang.org/tools/install) for further instructions on installing Rust.
9+
Before installing Rustlings, you must have the **latest version of Rust** installed.
10+
Visit [www.rust-lang.org/tools/install](https://www.rust-lang.org/tools/install) for further instructions.
1111
This will also install _Cargo_, Rust's package/project manager.
1212

13-
> 🐧 If you are on Linux, make sure you have installed `gcc` (for a linker).
13+
> 🐧 If you are on Linux, make sure you have `gcc` installed (_for a linker_).
1414
>
15-
> Deb: `sudo apt install gcc`
16-
>
17-
> Dnf: `sudo dnf install gcc`
15+
> Debian: `sudo apt install gcc`\
16+
> Fedora: `sudo dnf install gcc`
1817
19-
> 🍎 If you are on MacOS, make sure you have installed Xcode and its developer tools by running `xcode-select --install`.
18+
> 🍎 If you are on MacOS, make sure you have _Xcode and its developer tools_ installed: `xcode-select --install`
2019
2120
## Installing Rustlings
2221

@@ -26,14 +25,13 @@ The following command will download and compile Rustlings:
2625
cargo install rustlings
2726
```
2827

29-
<details>
30-
<summary><strong>If the installation fails…</strong> (<em>click to expand</em>)</summary>
28+
{% details(summary="If the installation fails…") %}
3129

32-
> - Make sure you have the latest Rust version by running `rustup update`
33-
> - Try adding the `--locked` flag: `cargo install rustlings --locked`
34-
> - Otherwise, please [report the issue](https://github.com/rust-lang/rustlings/issues/new)
30+
- Make sure you have the latest Rust version by running `rustup update`
31+
- Try adding the `--locked` flag: `cargo install rustlings --locked`
32+
- Otherwise, please [report the issue](https://github.com/rust-lang/rustlings/issues/new)
3533

36-
</details>
34+
{% end %}
3735

3836
## Initialization
3937

@@ -43,18 +41,17 @@ After installing Rustlings, run the following command to initialize the `rustlin
4341
rustlings init
4442
```
4543

46-
<details>
47-
<summary><strong>If the command <code>rustlings</code> can't be found…</strong> (<em>click to expand</em>)</summary>
44+
{% details(summary="If the command <code>rustlings</code> can't be found…") %}
4845

49-
> You are probably using Linux and installed Rust using your package manager.
50-
>
51-
> Cargo installs binaries to the directory `~/.cargo/bin`.
52-
> Sadly, package managers often don't add `~/.cargo/bin` to your `PATH` environment variable.
53-
>
54-
> - Either add `~/.cargo/bin` manually to `PATH`
55-
> - Or uninstall Rust from the package manager and [install it using the official way with `rustup`](https://www.rust-lang.org/tools/install)
46+
You are probably using Linux and installed Rust using your package manager.
47+
48+
Cargo installs binaries to the directory `~/.cargo/bin`.
49+
Sadly, package managers often don't add `~/.cargo/bin` to your `PATH` environment variable.
50+
51+
- Either add `~/.cargo/bin` manually to `PATH`
52+
- Or uninstall Rust from the package manager and [install it using the official way with `rustup`](https://www.rust-lang.org/tools/install)
5653

57-
</details>
54+
{% end %}
5855

5956
Now, go into the newly initialized directory and launch Rustlings for further instructions on getting started with the exercises:
6057

website/content/usage/index.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,13 @@ After the [initialization](@/setup/index.md#initialization), Rustlings can be la
2323
This will start the _watch mode_ which walks you through the exercises in a predefined order (what we think is best for newcomers).
2424
It will rerun the current exercise automatically every time you change the exercise's file in the `exercises/` directory.
2525

26-
<details>
27-
<summary><strong>If detecting file changes in the <code>exercises/</code> directory fails…</strong> (<em>click to expand</em>)</summary>
26+
{% details(summary="If detecting file changes in the <code>exercises/</code> directory fails…") %}
2827

29-
> You can add the **`--manual-run`** flag (`rustlings --manual-run`) to manually rerun the current exercise by entering `r` in the watch mode.
30-
>
31-
> Please [report the issue](https://github.com/rust-lang/rustlings/issues/new) with some information about your operating system and whether you run Rustlings in a container or virtual machine (e.g. WSL).
28+
You can add the **`--manual-run`** flag (`rustlings --manual-run`) to manually rerun the current exercise by entering `r` in the watch mode.
3229

33-
</details>
30+
Please [report the issue](https://github.com/rust-lang/rustlings/issues/new) with some information about your operating system and whether you run Rustlings in a container or virtual machine (e.g. WSL).
31+
32+
{% end %}
3433

3534
## Exercise List
3635

website/input.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
@apply md:w-3/4 lg:w-3/5;
4242
}
4343
blockquote {
44-
@apply px-3 pt-2 pb-0.5 my-4 border-s-4 border-white/80 bg-white/7 rounded-sm italic;
44+
@apply px-3 pt-2 pb-0.5 my-4 border-s-4 border-white/80 bg-white/7 rounded-sm;
4545
}
4646

4747
pre {
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<details>
2+
<summary>
3+
<strong>{{ summary | safe }}</strong> (<em>click to expand</em>)
4+
</summary>
5+
6+
<blockquote>
7+
{{ body | markdown | safe }}
8+
</blockquote>
9+
</details>

0 commit comments

Comments
 (0)