mirror of
https://github.com/zen-browser/www.git
synced 2025-07-08 01:10:02 +02:00
fix: fix trailing slash of Astro.url.pathname
This commit is contained in:
parent
4f70aa01de
commit
6203e8a573
2 changed files with 21 additions and 2 deletions
|
@ -7,6 +7,7 @@ import { defineConfig } from 'astro/config'
|
|||
export default defineConfig({
|
||||
integrations: [tailwind(), react(), sitemap()],
|
||||
site: 'https://zen-browser.app',
|
||||
trailingSlash: 'never',
|
||||
i18n: {
|
||||
defaultLocale: 'en',
|
||||
locales: ['en', 'ja'],
|
||||
|
|
|
@ -96,13 +96,31 @@ const {
|
|||
</DropdownItems>
|
||||
</Dropdown>
|
||||
<a
|
||||
class={`hidden items-center hover:bg-muted rounded-lg p-3 lg:block${Astro.url.pathname === getLocalePath('/about') ? ' text-coral' : ''}`}
|
||||
class:list={{
|
||||
hidden: true,
|
||||
'items-center': true,
|
||||
'hover:bg-muted': true,
|
||||
'rounded-lg': true,
|
||||
'p-3': true,
|
||||
'lg:block': true,
|
||||
'text-coral': Astro.url.pathname === getLocalePath('/about'),
|
||||
}}
|
||||
data-active={Astro.url.pathname === getLocalePath('/about')}
|
||||
href={getLocalePath('/about')}
|
||||
>
|
||||
<span>{menu.aboutUs}</span>
|
||||
</a>
|
||||
<a
|
||||
class={`hidden items-center hover:bg-muted rounded-lg p-3 lg:block${Astro.url.pathname === getLocalePath('/mods') ? ' text-coral' : ''}`}
|
||||
class:list={{
|
||||
hidden: true,
|
||||
'items-center': true,
|
||||
'hover:bg-muted': true,
|
||||
'rounded-lg': true,
|
||||
'p-3': true,
|
||||
'lg:block': true,
|
||||
'text-coral': Astro.url.pathname === getLocalePath('/mods'),
|
||||
}}
|
||||
data-active={Astro.url.pathname === getLocalePath('/mods')}
|
||||
href={getLocalePath('/mods')}
|
||||
>
|
||||
<span>{menu.mods}</span>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue