diff --git a/package.json b/package.json index 6fea8dc..fa312ca 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,8 @@ "scripts": { "dev": "astro dev", "build": "astro build", + "build:test": "PUBLIC_APP_ENV_LABEL=测试环境 astro build", + "build:prod": "PUBLIC_APP_ENV_LABEL=生产环境 astro build", "preview": "astro preview" }, "dependencies": { diff --git a/src/pages/index.astro b/src/pages/index.astro index 22a3f2d..fffca5f 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -3,6 +3,7 @@ import { resume, resumeEn } from "../data/resume"; import "../styles/global.css"; const githubUrl = "https://github.com/zhanBoss"; +const appEnvLabel = import.meta.env.PUBLIC_APP_ENV_LABEL || "生产环境"; const translations = { zh: resume, en: resumeEn }; const navIds = ["top", "proof", "skills", "projects", "experience", "contact"]; const brandAssets = { @@ -143,6 +144,7 @@ const projectLogoFor = (id: string) => brandAssets.projects[id] ?? null;
+