mirror of
https://github.com/rust-lang/rustlings.git
synced 2025-07-17 01:32:35 +02:00
Add setup and usage pages
This commit is contained in:
@ -6,6 +6,6 @@
|
||||
<div class="m-3">
|
||||
<h1>Rustlings</h1>
|
||||
|
||||
{{ section.content | replace(from="<!-- toc -->", to=macros::toc() ) | safe }}
|
||||
{{ section.content | safe }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -1,15 +1,9 @@
|
||||
{% macro toc() %}
|
||||
{%- if page.toc -%}
|
||||
{% set_global toc = page.toc %}
|
||||
{%- else -%}
|
||||
{% set_global toc = section.toc %}
|
||||
{%- endif -%}
|
||||
|
||||
{% if toc %}
|
||||
{% if page.toc %}
|
||||
<div class="px-4 py-0.5 my-3 border-s-4 rounded-xl border-double">
|
||||
<nav>
|
||||
<ul class="ml-0 list-none">
|
||||
{% for parent in toc %}
|
||||
{% for parent in page.toc %}
|
||||
{% if parent.level == 2 %}
|
||||
<li>
|
||||
{#- -#}
|
||||
|
Reference in New Issue
Block a user