File tree Expand file tree Collapse file tree 3 files changed +13
-7
lines changed
Expand file tree Collapse file tree 3 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -16,16 +16,16 @@ logo_path = "images/happy_ferris.svg"
1616
1717[[extra .menu_items ]]
1818name = " Rustlings"
19- url = " / "
19+ url = " @/_index.md "
2020[[extra .menu_items ]]
2121name = " Setup"
22- url = " /setup"
22+ url = " @ /setup/index.md "
2323[[extra .menu_items ]]
2424name = " Usage"
25- url = " /usage"
25+ url = " @ /usage/index.md "
2626[[extra .menu_items ]]
2727name = " Community Exercises"
28- url = " /community-exercises"
28+ url = " @ /community-exercises/index.md "
2929[[extra .menu_items ]]
3030name = " Q&A"
3131url = " https://github.com/rust-lang/rustlings/discussions/categories/q-a?discussions_q="
Original file line number Diff line number Diff line change @@ -9,6 +9,6 @@ <h2>404: Page not found!</h2>
99 src ="{{ get_url(path='images/panic.svg') | safe }} "
1010 alt ="">
1111
12- < a class ="text-2xl font-bold " href ="{{ get_url(path='/ ') }} "> Back to homepage</ a >
12+ < a class ="text-2xl font-bold " href ="{{ get_url(path='@/_index.md ') }} "> Back to homepage</ a >
1313 </ div >
1414{% endblock %}
Original file line number Diff line number Diff line change 5050 < 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 ">
5151 < 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 ">
5252 < a class ="transition duration-500 hover:scale-110 "
53- href ="{{ get_url(path='/ ') | safe }} "
53+ href ="{{ get_url(path='@/_index.md ') | safe }} "
5454 aria-hidden ="true ">
5555 < img class ="w-12 h-12 "
5656 src ="{{ get_url(path=config.extra.logo_path) | safe }} "
5959
6060 < nav class ="flex flex-col gap-x-6 items-center font-bold sm:flex-row ">
6161 {% for menu_item in config.extra.menu_items %}
62- < a class ="p-1 no-underline " href ="{{ menu_item.url | safe }} "> {{ menu_item.name }}</ a >
62+ {%- if menu_item.url is starting_with("@") -%}
63+ {% set_global menu_item_url = get_url(path=menu_item.url) %}
64+ {%- else -%}
65+ {% set_global menu_item_url = menu_item.url %}
66+ {%- endif %}
67+
68+ < a class ="p-1 no-underline " href ="{{ menu_item_url | safe }} "> {{ menu_item.name }}</ a >
6369 {% endfor %}
6470 </ nav >
6571 </ header >
You can’t perform that action at this time.
0 commit comments