- building client + server bundles...
🎈 SUMMARY 解析中...
🎈 SUMMARY 解析完成...
x Build failed in 1m 42s
✖ building client + server bundles...
build error:
Unexpected early exit. This happens when Promises returned by plugins cannot resolve. Unfinished hook action(s) on exit:
(vitepress-plugin-pagefind) load "\u0000virtual:pagefind"
Error: Unexpected early exit. This happens when Promises returned by plugins cannot resolve. Unfinished hook action(s) on exit:
(vitepress-plugin-pagefind) load "\u0000virtual:pagefind"
at process.handleBeforeExit (file:///home/runner/work/taophilosophy.github.io/taophilosophy.github.io/node_modules/.pnpm/rollup@4.[17](https://github.com/taophilosophy/taophilosophy.github.io/actions/runs/9171633579/job/25216376212#step:10:18).2/node_modules/rollup/dist/es/shared/node-entry.js:20115:28)
at Object.onceWrapper (node:events:634:26)
at process.emit (node:events:5[19](https://github.com/taophilosophy/taophilosophy.github.io/actions/runs/9171633579/job/25216376212#step:10:20):28)
ELIFECYCLE Command failed with exit code 1.
Error: Process completed with exit code 1.
import {
defineConfig
} from 'vitepress';
import autoNav from "vite-plugin-vitepress-auto-nav";
import footnote from 'markdown-it-footnote';
import mathjax3 from 'markdown-it-mathjax3';
import taskLists from 'markdown-it-task-checkbox';
import { chineseSearchOptimize, pagefindPlugin } from 'vitepress-plugin-pagefind';
export default defineConfig({
build: {
chunkSizeWarningLimit: 1600
},
sitemap: {
hostname: 'https://taophilosophy.github.io',
},
lang: 'zh-CN',
lastUpdated: true,
title: "斯坦福哲学百科全书简体中文版",
description: "斯坦福哲学百科全书",
metaChunk: true,
markdown: {
math: true,
image: {
lazyLoading: true
},
config(md) {
const defaultCodeInline = md.renderer.rules.code_inline!
md.renderer.rules.code_inline = (tokens, idx, options, env, self) => {
tokens[idx].attrSet('v-pre', '')
return defaultCodeInline(tokens, idx, options, env, self);
md.use(footnote);
md.use(mathjax3);
md.use(taskLists, {
disabled: true,
divWrap: false,
divClass: 'checkbox',
idPrefix: 'cbx_',
ulClass: 'task-list',
liClass: 'task-list-item',
});
}
},
},
head: [
['link', {
rel: 'icon',
href: '/favicon.ico'
}],
['meta', {
name: 'keywords',
content: ''
}],
[
'script',
{
async: '',
src: 'https://www.googletagmanager.com/gtag/js?id=TAG_ID'
}
],
[
'script',
{},
`window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'TAG_ID');`
],
],
rewrites: {
'README.md': 'index.md',
},
themeConfig: {
siteTitle: '斯坦福哲学百科全书',
langMenuLabel: '多语言',
returnToTopLabel: '回到顶部',
darkModeSwitchLabel: '主题',
lightModeSwitchTitle: '切换到浅色模式',
darkModeSwitchTitle: '切换到深色模式',
docFooter: {
prev: '上一页',
next: '下一页'
},
logo: {
src: '/logo.svg',
width: 24,
height: 24
},
nav: [{
text: '斯坦福哲学百科全书简体中文版-分类目录',
link: 'mu-lu-s.md'
},
{
text: '原版目录(A-Z)',
link: 'SUMMARY.md'
},
],
base: '/',
editLink: {
text: '在 GitHub 上编辑此页面',
pattern: 'https://github.com/taophilosophy/SEP-CN/edit/main/:path'
},
outline: {
label: '此页目录',
level: 'deep'
},
sidebarMenuLabel: '目录',
externalLinkIcon: true,
lastUpdated: {
text: '最后更新于',
formatOptions: {
dateStyle: 'short',
timeStyle: 'medium'
}
},
},
vite: {
plugins: [pagefindPlugin({
customSearchQuery: chineseSearchOptimize,
btnPlaceholder: '搜索',
placeholder: '搜索文档',
emptyText: '空空如也',
heading: '共: {{searchResult}} 条结果',
excludeSelector: ['img', 'a.header-anchor'],
} ),
autoNav({
summary: {
target: "doc/mu-lu-s.md",
collapsed: false,
}
})
],
},
})