Commit e037591 1 parent 4894f11 commit e037591 Copy full SHA for e037591
File tree 2 files changed +10
-2
lines changed
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -12,4 +12,9 @@ export default defineConfig({
12
12
defaultLocale : 'en' ,
13
13
locales : [ 'en' , 'zh' ] ,
14
14
} ,
15
+ ...( process . env . NODE_ENV === 'production' ? {
16
+ site : 'https://openbuildxyz.github.io/' ,
17
+ base : 'eco' ,
18
+ trailingSlash : 'never' ,
19
+ } : undefined ) ,
15
20
} ) ;
Original file line number Diff line number Diff line change @@ -10,19 +10,22 @@ interface Props {
10
10
const { hideNavs = false } = Astro .props ;
11
11
const locale = (Astro .currentLocale || ' en' ) as ' en' | ' zh' ;
12
12
const i18n = I18N_CONFIG [locale ];
13
- const getLocaleUrl = getRelativeLocaleUrl .bind (null , locale );
13
+ const baseUrl = import .meta .env .BASE_URL ;
14
+ const getLocaleUrl = (path : string ) => getRelativeLocaleUrl (locale , path , baseUrl ? { prependWith: baseUrl } : undefined );
14
15
---
15
16
16
17
<header >
17
18
<nav >
18
19
<h2 ><a href ={ getLocaleUrl (' /' )} >{ i18n .site .title } </a ></h2 >
19
- { hideNavs !== true && (
20
+ { hideNavs !== true ? (
20
21
<div class = " internal-links" >
21
22
<HeaderLink href = { getLocaleUrl (' /' )} >{ i18n .navs .home } </HeaderLink >
22
23
<HeaderLink href = { getLocaleUrl (' /projects' )} >{ i18n .navs .projects } </HeaderLink >
23
24
<HeaderLink href = { getLocaleUrl (' /contributing' )} >{ i18n .navs .contributing } </HeaderLink >
24
25
<HeaderLink href = { getLocaleUrl (' /about' )} >{ i18n .navs .about } </HeaderLink >
25
26
</div >
27
+ ) : (
28
+ <div style = " min-height: 78px;" ></div >
26
29
)}
27
30
</nav >
28
31
</header >
You can’t perform that action at this time.
0 commit comments