File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { source } from "@/lib/source" ;
2+ import { SITE_URL } from "@/lib/site-url" ;
23import { DocsPage , DocsBody } from "fumadocs-ui/page" ;
34import { notFound } from "next/navigation" ;
45import type { Metadata } from "next" ;
@@ -94,8 +95,7 @@ export default async function DocPage({ params }: Param) {
9495 const Mdx = page . data . body ;
9596
9697 // SEO 结构化数据
97- const siteUrl =
98- process . env . NEXT_PUBLIC_SITE_URL || "https://involutionhell.com" ;
98+ const siteUrl = SITE_URL ;
9999 const slugPath = ( slug ?? [ ] ) . join ( "/" ) ;
100100 const docUrl = slugPath ? `${ siteUrl } /docs/${ slugPath } ` : `${ siteUrl } /docs` ;
101101
Original file line number Diff line number Diff line change @@ -26,8 +26,7 @@ const geistMono = localFont({
2626 weight : "100 900" ,
2727} ) ;
2828
29- const SITE_URL =
30- process . env . NEXT_PUBLIC_SITE_URL || "https://involutionhell.com" ;
29+ import { SITE_URL } from "@/lib/site-url" ;
3130const en_description =
3231 "内卷地狱(Involution Hell)是一个由开发者发起的开源学习社区,专注算法、系统设计、工程实践与技术分享,帮助华人程序员高效成长,专注真实进步。Involution Hell is an open-source community empowering builders with real-world engineering." ;
3332
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import { GithubRepos, GithubReposSkeleton } from "./GithubRepos";
1717import { Suspense } from "react" ;
1818import { getTranslations } from "next-intl/server" ;
1919import { sanitizeExternalUrl } from "@/lib/url-safety" ;
20+ import { SITE_URL } from "@/lib/site-url" ;
2021
2122interface UserView {
2223 id : number ;
@@ -342,8 +343,7 @@ export default async function UserProfilePage({ params }: Param) {
342343 } ) ;
343344
344345 // Person JSON-LD:让搜索引擎识别这是一个"个人档案"而不是普通页面,有机会走 knowledge panel
345- const siteUrl =
346- process . env . NEXT_PUBLIC_SITE_URL || "https://involutionhell.com" ;
346+ const siteUrl = SITE_URL ;
347347 const personJsonLd = {
348348 "@context" : "https://schema.org" ,
349349 "@type" : "Person" ,
You can’t perform that action at this time.
0 commit comments