Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Build CSS
run: npx @tailwindcss/cli -m -i input.css -o static/main.css
- name: Download Zola
run: curl -fsSL https://github.com/getzola/zola/releases/download/v0.22.1/zola-v0.22.1-x86_64-unknown-linux-gnu.tar.gz | tar xz
run: curl -fsSL https://github.com/getzola/zola/releases/download/v0.23.1/zola-v0.23.1-x86_64-unknown-linux-gnu.tar.gz | tar xz
- name: Build site
run: ./zola build
- name: Upload static files as artifact
Expand Down
10 changes: 4 additions & 6 deletions website/content/setup/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
title = "Setup"
+++

<!-- toc -->

## Installing Rust

Before installing Rustlings, you must have the **latest version of Rust** installed.
Expand All @@ -25,13 +23,13 @@ The following command will download and compile Rustlings:
cargo install rustlings
```

{% details(summary="If the installation fails…") %}
{% <details summary="If the installation fails…"> %}

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

{% end %}
{% </details> %}

## Initialization

Expand All @@ -41,7 +39,7 @@ After installing Rustlings, run the following command to initialize the `rustlin
rustlings init
```

{% details(summary="If the command <code>rustlings</code> can't be found…") %}
{% <details summary="If the command <code>rustlings</code> can't be found…"> %}

You are probably using Linux and installed Rust using your package manager.

Expand All @@ -51,7 +49,7 @@ Sadly, package managers often don't add `~/.cargo/bin` to your `PATH` environmen
- Either add `~/.cargo/bin` manually to `PATH`
- Or uninstall Rust from the package manager and [install it using the official way with `rustup`](https://www.rust-lang.org/tools/install)

{% end %}
{% </details> %}

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

Expand Down
6 changes: 2 additions & 4 deletions website/content/usage/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
title = "Usage"
+++

<!-- toc -->

## Doing exercises

The exercises are sorted by topic and can be found in the subdirectory `exercises/<topic>`.
Expand All @@ -23,13 +21,13 @@ After the [initialization](@/setup/index.md#initialization), Rustlings can be la
This will start the _watch mode_ which walks you through the exercises in a predefined order (what we think is best for newcomers).
It will rerun the current exercise automatically every time you change the exercise's file in the `exercises/` directory.

{% details(summary="If detecting file changes in the <code>exercises/</code> directory fails…") %}
{% <details summary="If detecting file changes in the <code>exercises/</code> directory fails…"> %}

You can add the **`--manual-run`** flag (`rustlings --manual-run`) to manually rerun the current exercise by entering `r` in the watch mode.

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 a virtual machine (e.g. WSL).

{% end %}
{% </details> %}

## Exercise List

Expand Down
14 changes: 7 additions & 7 deletions website/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@

{%- set timestamp = now(timestamp=true) -%}

{%- if page.title -%}
{%- if page?.title -%}
{% set_global title = page.title %}
{%- elif section.title -%}
{%- elif section?.title -%}
{% set_global title = section.title %}
{%- else -%}
{% set_global title = config.title %}
{%- endif -%}

{%- if page.description -%}
{%- if page?.description -%}
{% set_global description = page.description %}
{%- elif section.description -%}
{%- elif section?.description -%}
{% set_global description = section.description %}
{%- else -%}
{% set_global description = config.description %}
{%- endif -%}

{%- if page.permalink -%}
{%- if page?.permalink -%}
{% set_global permalink = page.permalink %}
{%- elif section.permalink -%}
{%- elif section?.permalink -%}
{% set_global permalink = section.permalink %}
{%- endif %}

Expand Down Expand Up @@ -59,7 +59,7 @@

<nav class="flex flex-col gap-x-6 items-center font-bold sm:flex-row">
{% for menu_item in config.extra.menu_items %}
{%- if menu_item.url is starting_with("@") -%}
{%- if menu_item.url is starting_with(pat="@") -%}
{% set_global menu_item_url = get_url(path=menu_item.url) %}
{%- else -%}
{% set_global menu_item_url = menu_item.url %}
Expand Down
8 changes: 8 additions & 0 deletions website/templates/components.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{% component details(summary: string) %}
<details>
<summary>
<strong>{{ summary }}</strong> (<em>click to expand</em>)
</summary>
<blockquote class="pt-1 mx-0.5 mt-1 rounded-none border-dashed border-x-3 border-b-3">{{ body | markdown }}</blockquote>
</details>
{% endcomponent %}
9 changes: 0 additions & 9 deletions website/templates/shortcodes/details.html

This file was deleted.

Loading