File tree Expand file tree Collapse file tree 3 files changed +27
-0
lines changed
Expand file tree Collapse file tree 3 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ export default defineConfig({
6868 en : "HMCL Documentation" ,
6969 } ,
7070 components : {
71+ Banner : "./src/components/starlight/Banner.astro" ,
7172 PageTitle : "./src/components/starlight/PageTitle.astro" ,
7273 Footer : "./src/components/starlight/Footer.astro" ,
7374 } ,
Original file line number Diff line number Diff line change 1+ ---
2+
3+ ---
4+
5+ <div class =" unofficial-site-alert" >
6+ 您正在访问第三方构建的文档站。如需查看官方文档,请<a href =" https://docs.hmcl.net" >点击此处</a
7+ >跳转。
8+ </div >
9+
10+ <style >
11+ .unofficial-site-alert {
12+ text-align: center;
13+ padding: 0.75em 1em;
14+ background-color: var(--sl-color-orange-low);
15+ }
16+ </style >
Original file line number Diff line number Diff line change 1+ ---
2+ import DefaultBanner from " @astrojs/starlight/components/Banner.astro" ;
3+ import UnofficialSiteAlert from " @components/UnofficialSiteAlert.astro" ;
4+
5+ const displayUnofficialSiteAlert = import .meta .env .PUBLIC_SITE_URL !== " https://docs.hmcl.net" ;
6+ ---
7+
8+ { displayUnofficialSiteAlert && <UnofficialSiteAlert />}
9+
10+ <DefaultBanner />
You can’t perform that action at this time.
0 commit comments