mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-08-14 14:26:56 +00:00
Update Zola
This commit is contained in:
parent
30edc559b2
commit
d0166034c1
2
.github/workflows/website.yml
vendored
2
.github/workflows/website.yml
vendored
@ -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
|
||||
|
||||
@ -2,8 +2,6 @@
|
||||
title = "Setup"
|
||||
+++
|
||||
|
||||
<!-- toc -->
|
||||
|
||||
## Installing Rust
|
||||
|
||||
Before installing Rustlings, you must have the **latest version of Rust** installed.
|
||||
@ -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
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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:
|
||||
|
||||
|
||||
@ -2,8 +2,6 @@
|
||||
title = "Usage"
|
||||
+++
|
||||
|
||||
<!-- toc -->
|
||||
|
||||
## Doing exercises
|
||||
|
||||
The exercises are sorted by topic and can be found in the subdirectory `exercises/<topic>`.
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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 %}
|
||||
|
||||
@ -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 %}
|
||||
|
||||
8
website/templates/components.html
Normal file
8
website/templates/components.html
Normal file
@ -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 %}
|
||||
@ -1,9 +0,0 @@
|
||||
<details>
|
||||
<summary>
|
||||
<strong>{{ summary | safe }}</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 | safe }}
|
||||
</blockquote>
|
||||
</details>
|
||||
Loading…
x
Reference in New Issue
Block a user