11---
22import BaseLayout from ' ../../layouts/BaseLayout.astro' ;
33import ' ../../styles/docs.css' ;
4- import { SECTION_CATEGORIES , SECTION_ORDER } from ' ./ sidebar.config' ;
4+ import { SECTION_CATEGORIES , SECTION_ORDER } from ' ../../lib/docs- sidebar.config' ;
55
66const SLUG_LABEL: Record <string , string > = {
77 home: ' Home' ,
@@ -58,6 +58,7 @@ const title = isRoot
5858 : ` rinha2-back-end-rust | ${SLUG_LABEL [requestedSlug ?? ' ' ] ?? ' Documentation' } ` ;
5959const description = ' Documentation for the Rust/Actix-web 4 implementation of the Rinha de Backend 2024/Q1 challenge.' ;
6060
61+ const homeHref = import .meta .env .BASE_URL || ' /' ;
6162const docsBase = Astro .site
6263 ? new URL (Astro .url .pathname .replace (/ \/ docs\/ . * / , ' /docs/' ), Astro .site ).href .replace (/ \/ $ / , ' ' )
6364 : Astro .url .pathname .replace (/ \/ docs\/ . * / , ' /docs/' ).replace (/ \/ $ / , ' ' );
@@ -81,8 +82,13 @@ const docsBase = Astro.site
8182
8283 <aside class =" sidebar" id =" sidebar" >
8384 <div class =" sidebar-header" >
84- <div class =" repo-title" >rinha2-back-end-rust</div >
85- <p class =" repo-description" >Rust/Actix-web 4 banking API under strict resource constraints.</p >
85+ <a class =" repo-mark" href ={ homeHref } aria-label =" Back to homepage" >
86+ <span class =" repo-sigil" >R2</span >
87+ <span >
88+ <span class =" repo-title" >rinha2-back-end-rust</span >
89+ <span class =" repo-description" >Rust/Actix-web 4 banking API under strict resource constraints.</span >
90+ </span >
91+ </a >
8692 <input
8793 type =" text"
8894 class =" search-box"
@@ -118,7 +124,7 @@ const docsBase = Astro.site
118124 </div >
119125
120126 <div class =" sidebar-footer" >
121- <a href = " / " >← Back to Home </a >
127+ <a class = " back-home " href = { homeHref } >← Main homepage </a >
122128 <a href =" https://github.com/jonathanperis/rinha2-back-end-rust" target =" _blank" rel =" noopener noreferrer" >GitHub</a >
123129 </div >
124130 </aside >
0 commit comments