refactor(website): 域名/邮箱/渠道收口到 src/config/site.ts 单一真相源
新增 SITE 配置(url/email/telegram/line/store),Footer、Pricing、astro.config (canonical 域名)均改为引用它;改联系方式/域名只动一处。 astro.config.mjs 直接 import 该 TS(Astro 配置加载支持)。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
// @ts-check
|
||||
import { defineConfig } from 'astro/config';
|
||||
import react from '@astrojs/react';
|
||||
import { SITE } from './src/config/site.ts';
|
||||
|
||||
// 纯静态站点 (SSG),零 SSR。
|
||||
// `site` 仅用于生成绝对 URL(sitemap / canonical),镜像部署时可被任意域名覆盖,
|
||||
// 不影响「整站可秒级复制到任意备用域名」:产物为纯相对路径静态文件。
|
||||
// 主站 canonical 域名。镜像构建务必用「同一个」SITE_URL,使 canonical 始终指向主站
|
||||
// (避免镜像与主站 SEO 竞争),且主站/镜像产物 hash 完全一致(验收:内容一致性)。
|
||||
const SITE_URL = process.env.SITE_URL || 'https://pangolin.yanmeiai.com';
|
||||
const SITE_URL = process.env.SITE_URL || SITE.url;
|
||||
|
||||
export default defineConfig({
|
||||
site: SITE_URL,
|
||||
|
||||
Reference in New Issue
Block a user