Add quick fix for non root bases
This commit is contained in:
parent
ac41426a20
commit
3e5664a877
7 changed files with 34 additions and 14 deletions
|
|
@ -16,6 +16,10 @@ const { currentPage } = Astro.props as Props;
|
|||
// const lang = getLanguageFromURL(currentPage);
|
||||
const langCode = 'en'; // getLanguageFromURL(currentPage);
|
||||
const sidebar = SIDEBAR[langCode];
|
||||
|
||||
const { BASE_URL } = import.meta.env;
|
||||
const base = BASE_URL;
|
||||
const baseNoTrailing = base.endsWith('/') ? base.slice(0, -1) : base;
|
||||
---
|
||||
|
||||
<nav
|
||||
|
|
@ -37,7 +41,7 @@ const sidebar = SIDEBAR[langCode];
|
|||
<div class="search-item h-10">
|
||||
<Search client:idle />
|
||||
</div>
|
||||
<a href="./" class="hidden md:flex cursor-pointer items-center space-x-1"
|
||||
<a href={`${baseNoTrailing}/`} class="hidden md:flex cursor-pointer items-center space-x-1"
|
||||
><CommandLineIcon className="w-5 h-5" /><span>go to REPL</span>
|
||||
</a>
|
||||
<div class="md:hidden">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue