File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33</p >
44
55<p align =" center " >
6- <a href =" https://involutionhell.com " >
6+ <a href =" https://involutionhell.com/?utm_source=github&utm_medium=readme&utm_campaign=logo " >
77 <picture>
88 <!-- Dark mode logo -->
99 <source media="(prefers-color-scheme: dark)" srcset="./public/logo/logoInDark.svg">
2121 <img alt =" Next.js " src =" https://img.shields.io/badge/Next.js-000000?style=for-the-badge&logo=nextdotjs&logoColor=white " />
2222 <img alt =" Vercel " src =" https://img.shields.io/badge/Vercel-000000?style=for-the-badge&logo=vercel&logoColor=white " />
2323 <a href =" https://github.com/InvolutionHell/involutionhell/blob/main/LICENSE " >
24- <a href =" https://involutionhell.com " >
24+ <a href =" https://involutionhell.com/?utm_source=github&utm_medium=readme&utm_campaign=badge " >
2525 <img src="https://img.shields.io/badge/Website-involutionhell.com-blue?style=for-the-badge" alt="Official Website">
2626 </a >
2727</p >
Original file line number Diff line number Diff line change 33</p >
44
55<p align =" center " >
6- <a href =" https://involutionhell.com " >
6+ <a href =" https://involutionhell.com/?utm_source=github&utm_medium=readme&utm_campaign=logo " >
77 <picture>
88 <!-- Dark mode logo -->
99 <source media="(prefers-color-scheme: dark)" srcset="./public/logo/logoInDark.svg">
2121 <img alt =" Next.js " src =" https://img.shields.io/badge/Next.js-000000?style=for-the-badge&logo=nextdotjs&logoColor=white " />
2222 <img alt =" Vercel " src =" https://img.shields.io/badge/Vercel-000000?style=for-the-badge&logo=vercel&logoColor=white " />
2323 <a href =" https://github.com/InvolutionHell/involutionhell/blob/main/LICENSE " >
24- <a href =" https://involutionhell.com " >
24+ <a href =" https://involutionhell.com/?utm_source=github&utm_medium=readme&utm_campaign=badge " >
2525 <img src="https://img.shields.io/badge/Website-involutionhell.com-blue?style=for-the-badge" alt="Official Website">
2626 </a >
2727</p >
Original file line number Diff line number Diff line change @@ -20,7 +20,12 @@ export function DocShareButton() {
2020 } , [ ] ) ;
2121
2222 const handleCopy = async ( ) => {
23- const url = window . location . href ;
23+ // 用户点"复制链接"必然是要发到外面(DC/微信/X)
24+ // 给链接打上 UTM,回流时能在 GA Source 维度看到 doc_share,区别于 (direct)
25+ const target = new URL ( window . location . href ) ;
26+ target . searchParams . set ( "utm_source" , "doc_share" ) ;
27+ target . searchParams . set ( "utm_medium" , "user_share" ) ;
28+ const url = target . toString ( ) ;
2429 try {
2530 await navigator . clipboard . writeText ( url ) ;
2631 setCopied ( true ) ;
Original file line number Diff line number Diff line change 11// next.config.mjs
2+ import path from "node:path" ;
3+ import { fileURLToPath } from "node:url" ;
24import { createMDX } from "fumadocs-mdx/next" ;
35import createNextIntlPlugin from "next-intl/plugin" ;
46import { withSentryConfig } from "@sentry/nextjs" ;
57
8+ // Next.js 16 detects multi-lockfile environments by searching upward for
9+ // pnpm-lock.yaml / package-lock.json / yarn.lock. 当父目录意外有 lockfile
10+ // 时(如开发服务器上 /home/ubuntu/package-lock.json),Next 会把 workspace
11+ // root 推到上层,turbopack 跟着到错的目录解析 node_modules,
12+ // 触发 "Can't resolve 'tailwindcss'" 之类报错。
13+ // 显式锁定到 frontend 自己目录,turbopack + outputFileTracing 双保险。
14+ const projectRoot = path . dirname ( fileURLToPath ( import . meta. url ) ) ;
15+
616/**
717 * IMPORTANT: remarkImage 配置已移至 source.config.ts 统一管理
818 *
@@ -22,6 +32,12 @@ const withNextIntl = createNextIntlPlugin("./i18n/request.ts");
2232/** @type {import('next').NextConfig } */
2333const config = {
2434 reactStrictMode : true ,
35+ // 强制锁定 turbopack 和 SSR file tracing 的根目录到 frontend/ 自己,
36+ // 避免上层意外 lockfile 把 root 推错(详见文件顶部注释)。
37+ turbopack : {
38+ root : projectRoot ,
39+ } ,
40+ outputFileTracingRoot : projectRoot ,
2541 /**
2642 * docs 目录整理产生的 URL 变化 → 301 重定向。
2743 *
You can’t perform that action at this time.
0 commit comments