Skip to content

Commit 03a9f76

Browse files
committed
remove prod
1 parent db209a0 commit 03a9f76

File tree

1 file changed

+12
-17
lines changed

1 file changed

+12
-17
lines changed

docs/.vitepress/config.mts

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ import { fileURLToPath, URL } from 'node:url'
99

1010
import llmstxt from 'vitepress-plugin-llms'
1111

12-
const prod = !!process.env.NETLIFY
13-
1412
export default defineConfig({
1513
title: "Xmake",
1614
metaChunk: true,
@@ -77,8 +75,7 @@ export default defineConfig({
7775
vite: {
7876
plugins: [
7977
groupIconVitePlugin(),
80-
prod &&
81-
llmstxt()
78+
llmstxt()
8279
],
8380
experimental: {
8481
enableNativePlugin: true
@@ -112,17 +109,15 @@ export default defineConfig({
112109
zh: { label: '简体中文' }
113110
},
114111

115-
transformPageData: prod
116-
? (pageData, ctx) => {
117-
const site = resolveSiteDataByRoute(
118-
ctx.siteConfig.site,
119-
pageData.relativePath
120-
)
121-
const title = `${pageData.title || site.title} | ${pageData.description || site.description}`
122-
;((pageData.frontmatter.head ??= []) as HeadConfig[]).push(
123-
['meta', { property: 'og:locale', content: site.lang }],
124-
['meta', { property: 'og:title', content: title }]
125-
)
126-
}
127-
: undefined
112+
transformPageData: (pageData, ctx) => {
113+
const site = resolveSiteDataByRoute(
114+
ctx.siteConfig.site,
115+
pageData.relativePath
116+
)
117+
const title = `${pageData.title || site.title} | ${pageData.description || site.description}`
118+
;((pageData.frontmatter.head ??= []) as HeadConfig[]).push(
119+
['meta', { property: 'og:locale', content: site.lang }],
120+
['meta', { property: 'og:title', content: title }]
121+
)
122+
}
128123
})

0 commit comments

Comments
 (0)