mirror of
https://github.com/rust-lang/rustlings.git
synced 2025-05-29 23:07:43 +02:00
Use internal links for validation
This commit is contained in:
parent
a51d6f1309
commit
54a74fd638
@ -16,16 +16,16 @@ logo_path = "images/happy_ferris.svg"
|
|||||||
|
|
||||||
[[extra.menu_items]]
|
[[extra.menu_items]]
|
||||||
name = "Rustlings"
|
name = "Rustlings"
|
||||||
url = "/"
|
url = "@/_index.md"
|
||||||
[[extra.menu_items]]
|
[[extra.menu_items]]
|
||||||
name = "Setup"
|
name = "Setup"
|
||||||
url = "/setup"
|
url = "@/setup/index.md"
|
||||||
[[extra.menu_items]]
|
[[extra.menu_items]]
|
||||||
name = "Usage"
|
name = "Usage"
|
||||||
url = "/usage"
|
url = "@/usage/index.md"
|
||||||
[[extra.menu_items]]
|
[[extra.menu_items]]
|
||||||
name = "Community Exercises"
|
name = "Community Exercises"
|
||||||
url = "/community-exercises"
|
url = "@/community-exercises/index.md"
|
||||||
[[extra.menu_items]]
|
[[extra.menu_items]]
|
||||||
name = "Q&A"
|
name = "Q&A"
|
||||||
url = "https://github.com/rust-lang/rustlings/discussions/categories/q-a?discussions_q="
|
url = "https://github.com/rust-lang/rustlings/discussions/categories/q-a?discussions_q="
|
||||||
|
@ -9,6 +9,6 @@
|
|||||||
src="{{ get_url(path='images/panic.svg') | safe }}"
|
src="{{ get_url(path='images/panic.svg') | safe }}"
|
||||||
alt="">
|
alt="">
|
||||||
|
|
||||||
<a class="text-2xl font-bold" href="{{ get_url(path='/') }}">Back to homepage</a>
|
<a class="text-2xl font-bold" href="{{ get_url(path='@/_index.md') }}">Back to homepage</a>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
<body class="flex flex-col p-2 mx-auto min-h-screen text-lg text-white break-words bg-[#2A3439] lg:px-5 2xl:container">
|
<body class="flex flex-col p-2 mx-auto min-h-screen text-lg text-white break-words bg-[#2A3439] lg:px-5 2xl:container">
|
||||||
<header class="flex flex-col gap-x-4 items-center py-2 px-4 mb-1 bg-black/30 rounded-sm sm:flex-row sm:rounded-full">
|
<header class="flex flex-col gap-x-4 items-center py-2 px-4 mb-1 bg-black/30 rounded-sm sm:flex-row sm:rounded-full">
|
||||||
<a class="transition duration-500 hover:scale-110"
|
<a class="transition duration-500 hover:scale-110"
|
||||||
href="{{ get_url(path='/') | safe }}"
|
href="{{ get_url(path='@/_index.md') | safe }}"
|
||||||
aria-hidden="true">
|
aria-hidden="true">
|
||||||
<img class="w-12 h-12"
|
<img class="w-12 h-12"
|
||||||
src="{{ get_url(path=config.extra.logo_path) | safe }}"
|
src="{{ get_url(path=config.extra.logo_path) | safe }}"
|
||||||
@ -59,7 +59,13 @@
|
|||||||
|
|
||||||
<nav class="flex flex-col gap-x-6 items-center font-bold sm:flex-row">
|
<nav class="flex flex-col gap-x-6 items-center font-bold sm:flex-row">
|
||||||
{% for menu_item in config.extra.menu_items %}
|
{% for menu_item in config.extra.menu_items %}
|
||||||
<a class="p-1 no-underline" href="{{ menu_item.url | safe }}">{{ menu_item.name }}</a>
|
{%- if menu_item.url is starting_with("@") -%}
|
||||||
|
{% set_global menu_item_url = get_url(path=menu_item.url) %}
|
||||||
|
{%- else -%}
|
||||||
|
{% set_global menu_item_url = menu_item.url %}
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
|
<a class="p-1 no-underline" href="{{ menu_item_url | safe }}">{{ menu_item.name }}</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user