atqq / sugar-blog Goto Github PK
View Code? Open in Web Editor NEW✍️📚我写博客的地方🤪🤪🤪记录随笔与学习笔记,仓库包含:博客内容,博客主题、博客模板、vitepress离线全文搜索插件、VitePress RSS 支持插件;a blog theme use vitepress
Home Page: https://sugarat.top
License: MIT License
✍️📚我写博客的地方🤪🤪🤪记录随笔与学习笔记,仓库包含:博客内容,博客主题、博客模板、vitepress离线全文搜索插件、VitePress RSS 支持插件;a blog theme use vitepress
Home Page: https://sugarat.top
License: MIT License
比如百度的标签验证,应该如何做呢
- 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.
请问应该如何做才能看到具体的错误信息?项目地址 https://github.com/taophilosophy/taophilosophy.github.io。奇怪的是本地按同样版本的软件配置就会无限卡住,内存 CPU 都没有变化,只有 git action 会抛出上述错误。
Git action 见 https://github.com/taophilosophy/taophilosophy.github.io/blob/main/.github/workflows/deploy.yml
找了找只看到了 vitejs/vite#13367
config.mts
:
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,
}
})
],
},
})
如题,在使用 vitepress 内置的 minisearch 的时候会出现预览的选项,可否增加该功能
## Advanced Ssage
should be ## Advanced Usage
Pages created via dynamic routes (https://vitepress.dev/guide/routing#dynamic-routes) are broken with v0.4.4.
Problem is that new frontmatter code that looks for index exclusion config tries to load non-existent source files.
Example:
build error:
[vitepress-plugin-pagefind] ENOENT: no such file or directory, open '/home/foo/docs/release_notes/3.x/3.0.0.md'
This file is auto generated by vitepress from the /home/foo/docs/release_notes/3.x/[version].md
and /home/foo/docs/release_notes/3.x/[version].paths.js
files.
Possible solution (verified working): wrap load code in try/catch, and ignore file if it doesn't exist in source.
From https://github.com/ATQQ/sugar-blog/blob/master/packages/vitepress-plugin-pagefind/src/index.ts#L92:
if (id.endsWith('.md')) {
let fileContent
try {
fileContent = await fs.promises.readFile(id, 'utf-8')
} catch (err) {
if (err.code === 'ENOENT') {
return code
}
throw(err)
}
const { data: frontmatter, content } = grayMatter(fileContent, {
excerpt: true
})
首先得夸一下,这个主题是我这几天在github上找到的基于vitepress的体验最好的主题。
基于这个主题,我构建了自己的博客ZQ-XU,非常感谢owner的分享!
在构建个人博客期间,我也有些许的建议,希望owner在后续的开发中可以考虑一下:
祝好~
Deprecation Warning: Sass's behavior for declarations that appear after nested
rules will be changing to match the behavior specified by CSS in an upcoming
version. To keep the existing behavior, move the declaration above the nested
rule. To opt into the new behavior, wrap the declaration in `& {}`.
More info: https://sass-lang.com/d/mixed-decls
╷
26 │ ┌ &::before {
27 │ │ content: "";
28 │ │ inset: 0;
29 │ │ position: fixed;
30 │ │ top: 0;
31 │ │ z-index: -1;
32 │ │ background-image: url(./bg.png);
33 │ │ background-repeat: repeat;
34 │ │ min-height: 100%;
35 │ │ }
│ └─── nested rule
... │
37 │ min-height: 100vh;
│ ^^^^^^^^^^^^^^^^^ declaration
╵
node_modules\.pnpm\@[email protected]_@[email protected][email protected][email protected]___element-plus_uqszywcs5zbgipg4bfiuqwuag4\node_modules\@sugarat\theme\src\styles\index.scss 37:3 root stylesheet
{
"@element-plus/icons-vue": "^2.3.1",
"@sugarat/theme": "^0.4.7",
"element-plus": "^2.7.7",
"markdown-it": "^14.1.0",
"pagefind": "^1.1.0",
"vitepress-markdown-timeline": "^1.2.1",
"vitepress-plugin-pagefind": "^0.4.5",
"vue": "^3.4.32"
}
在博客背景配置也遇到了相同的警告
.VPHome {
// 自定义首页背景图
&::before {
background-image: var(--mf-bg-url);
background-size: cover;
}
// 定义遮罩样式
background: radial-gradient(
ellipse,
rgba(var(--bg-gradient-home), 1) 0%,
rgba(var(--bg-gradient-home), 0) 150%
);
}
修改后
.VPHome {
// 自定义首页背景图
&::before {
background-image: var(--mf-bg-url)
background-size: cover
}
& {
// 定义遮罩样式
background: radial-gradient(
ellipse,
rgba(var(--bg-gradient-home), 1) 0%,
rgba(var(--bg-gradient-home), 0) 150%
)
}
}
感觉你的这个插件很好用,但是我在使用的时候遇到这样一个问题,在搜索框里面输入的内容并无法过滤文章中的大小写字母。这样感觉会损失效率,你觉得呢?
Binary failed to download — package expected to have downloaded the binary to /Users/june/Desktop/my_blog/node_modules/.pnpm/[email protected]/node_modules/pagefind/bin/pagefind_extended during its postinstall
Do you have install scripts disabled for npm?
Try running npm config set ignore-scripts false
and re-installing.
Otherwise, your platform might not be supported. Open an issue on GitHub!
build error:
pagefind 不支持mac吗
我想找一个控制文章是否输出到 RSS 的选项,看到 frontmatter.publish 很适合。
Q:是否只影响 rss plugin 生成逻辑,不影响 vitepress 其他部分?比如 sitemap 中还是包含了 publish = false 的文章
以下方案可能是治标不治本的,我前端太菜了,还请作者有空时看看怎么解决。
删除 packages/theme/package.json
下的
"pnpm": {
"peerDependencyRules": {
"ignoreMissing": [
"@algolia/client-search",
"search-insights"
]
}
}
解决
如果使用 pnpm --filter 'blogpress' dev
报错:No projects matched the filters...
改为 pnpm -r --filter=./packages/blogpress dev
解决
如果使用 pnpm run '/^build:.*/'
改为 pnpm run \"/^build:.*/\"
报错:No projects matched the filters...
改为 pnpm -r --filter=./packages/** build
解决
控制台警告:[Vue warn]: Component "Mermaid" has already been registered in target app.
packages/theme/src/index.ts
注册前先判断是否已经注册过
if (!ctx.app.component('Mermaid')) {
ctx.app.component('Mermaid', Mermaid as any)
}
我在其中一个文档中引入自动加标题的css样式
<style type="text/css">
h1 { counter-reset: h2counter; }
h2 { counter-reset: h3counter; }
h3 { counter-reset: h4counter; }
h4 { counter-reset: h5counter; }
h5 { counter-reset: h6counter; }
h6 { }
h2:before {
counter-increment: h2counter;
content: counter(h2counter) ".\0000a0\0000a0";
}
h3:before {
counter-increment: h3counter;
content: counter(h2counter) "."
counter(h3counter) ".\0000a0\0000a0";
}
h4:before {
counter-increment: h4counter;
content: counter(h2counter) "."
counter(h3counter) "."
counter(h4counter) ".\0000a0\0000a0";
}
h5:before {
counter-increment: h5counter;
content: counter(h2counter) "."
counter(h3counter) "."
counter(h4counter) "."
counter(h5counter) ".\0000a0\0000a0";
}
h6:before {
counter-increment: h6counter;
content: counter(h2counter) "."
counter(h3counter) "."
counter(h4counter) "."
counter(h5counter) "."
counter(h6counter) ".\0000a0\0000a0";
}
</style>
dev的时候显示正常,build后每个md文件都加入了这个样式
特别是首页标题这里都自动加了数字
首页内容如下
layout: home
blog:
name: windstarry的Blog
motto: 记录学习,记录生活
inspiring: 知识是一点一滴积累起来的...
pageSize: 6
> 我这看不到你发的图片,看着你没有上传成功
Originally posted by @wanghuohuoyan in #94 (comment)
這邊尚未使用自訂網域前,使用 Github 的網域查看網站時一切正常
之後我就指定我的自訂網域,開啟網站後網站的 CSS 沒有被套用呈現一片白色
網站的 Github Repo:
https://github.com/snowlinouo/snowlin-blog
部署了半天发现少装一个包……一般其他插件都是作为依赖自动处理的。建议把 pagefind 作为依赖包进行安装。
failed to load config from /Users/liuguisheng/code/github/sugar-blog/packages/blogpress/.vitepress/config.ts
failed to start server. error:
Error: Cannot find module '/Users/liuguisheng/code/github/sugar-blog/packages/blogpress/node_modules/@sugarat/theme/node.js'
at createEsmNotFoundErr (node:internal/modules/cjs/loader:960:15)
at finalizeEsmResolution (node:internal/modules/cjs/loader:953:15)
at resolveExports (node:internal/modules/cjs/loader:482:14)
at Function.Module._findPath (node:internal/modules/cjs/loader:522:31)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object. (/Users/liuguisheng/code/github/sugar-blog/packages/blogpress/.vitepress/config.ts:35:19)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
建议保留中间的空格~
@sugarat/theme版本 0.1.30
在html中有这个动态导入代码
import('/_pagefind/pagefind.js')
.then((module) => {
window.__pagefind__ = module
})
.catch(() => {
console.log('not load /_pagefind/pagefind.js')
})
'pagefind' is not recognized as an internal or external command,
operable program or batch file.
build error:
Error: Command failed: npx pagefind --source docs.vitepress\dist --exclude-selectors "div.aside, a.header-anchor"
at checkExecSyncError (node:child_process:885:11)
at execSync (node:child_process:957:15)
at vitepressConfig.buildEnd (F:\vitepress\my-blog\node_modules.pnpm@[email protected][email protected][email protected]\node_modules@sugarat\theme\node.js:329:49)
at build (file:///F:/vitepress/my-blog/node_modules/.pnpm/vitepress@1.0.0-beta.5_@algolia[email protected][email protected][email protected]/node_modules/vitepress/dist/node/serve-d0f912b9.js:48768:59)
ELIFECYCLE Command failed with exit code 1.
大佬有空解决一下
还记得index.md,vitepress不能显示这个markdown,最后你怎么解决了
文章列表分页后,比如进入列表第三页某个文章后,无法返回到第三页文章列表,点浏览器的回退直接回到首页了。
技术周刊第79期,“现代的 js 中,主要存在 CommonJS(CJS) 与 CommonJS(CJS) 两种模块系统。”,这段文案cjs写重复了😁
/images/f1ce52f08ad9864f3bc30d2c2f9b7336.jpeg
/assets/f1ce52f08ad9864f3bc30d2c2f9b7336.dO6K0w_d.jpeg
,但index封面图还是/images/f1ce52f08ad9864f3bc30d2c2f9b7336.jpeg
不确定vitepress编译后的静态文件目录是否都在assets
,如果是的话修复就比较简单,直接判断是否是项目静态文件,如果是的话直接把路径强行变成/assets/xxx
。
不确定是否有其他影响,有什么其他配置可以更优雅的解决这个问题更好~
Mermaid流程图
pnpm dev 开发环境下运行博客显示没有问题
如果开始pnpm build 打包 显示不出来问题不知道什么原因造成?
博客仓库:
https://github.com/ZerxZ/zerxz-blog
博客网站链接:
https://zerxzonline.com/godot/godot_execution_order.html
在Vitepress里添加成功之后,点击Rss图标进入,页面出现了乱码问题,想知道该如何解决😭
你好,我在使用vitepress-plugin-rss这个包来实现网站的RSS更新,但是我在打包时出现了如下错误
build error:
cdata.replace is not a function
TypeError: cdata.replace is not a function
at writeCdata (/home/truraly/TPARA/Notes/blogs/node_modules/xml-js/lib/js2xml.js:111:142)
at writeElementsCompact (/home/truraly/TPARA/Notes/blogs/node_modules/xml-js/lib/js2xml.js:292:116)
at writeElementCompact (/home/truraly/TPARA/Notes/blogs/node_modules/xml-js/lib/js2xml.js:272:12)
at writeElementsCompact (/home/truraly/TPARA/Notes/blogs/node_modules/xml-js/lib/js2xml.js:295:73)
at writeElementCompact (/home/truraly/TPARA/Notes/blogs/node_modules/xml-js/lib/js2xml.js:272:12)
at writeElementsCompact (/home/truraly/TPARA/Notes/blogs/node_modules/xml-js/lib/js2xml.js:295:73)
at writeElementCompact (/home/truraly/TPARA/Notes/blogs/node_modules/xml-js/lib/js2xml.js:272:12)
at writeElementsCompact (/home/truraly/TPARA/Notes/blogs/node_modules/xml-js/lib/js2xml.js:295:73)
at writeElementCompact (/home/truraly/TPARA/Notes/blogs/node_modules/xml-js/lib/js2xml.js:272:12)
at writeElementsCompact (/home/truraly/TPARA/Notes/blogs/node_modules/xml-js/lib/js2xml.js:295:73)
经过详细的寻找package-lock.json
我发现了其中的依赖关系 xml-js -> feed -> vitepress-plugin-rss
package-lock.json
部分截取如下:
没有其他的依赖关系了
"node_modules/feed": {
"version": "4.2.2",
"license": "MIT",
"dependencies": {
"xml-js": "^1.6.11"
},
"engines": {
"node": ">=0.4.0"
}
},
"node_modules/xml-js": {
"version": "1.6.11",
"license": "MIT",
"dependencies": {
"sax": "^1.2.4"
},
"bin": {
"xml-js": "bin/cli.js"
}
},
"node_modules/vitepress-plugin-rss": {
"version": "0.2.9",
"license": "MIT",
"dependencies": {
"@sugarat/theme-shared": "0.0.2",
"fast-glob": "^3.2.12",
"feed": "^4.2.2"
},
"peerDependencies": {
"vitepress": "^1"
}
},
我的能力无法解决这个错误,我认为应该是这个插件导致的错误。
其余可能有用的信息
OS: Kubuntu 22.04.4 LTS x86_64
Kernel: 6.5.0-45-generic
CPU: AMD Ryzen 5 5600H with Radeon Graphics (12) @ 4.280GHz
GPU: AMD ATI 06:00.0 Cezanne
GPU: NVIDIA GeForce RTX 3050 Ti Mobile
Memory: 27905MiB
node:v21.5.0
很喜欢作者的作品, 确实是我用过最喜欢的VitePress主题!
在开启评论之后出现了一个问题: https://miaobuao.github.io/posts/%E5%AE%89%E8%A3%85electron%E5%8D%A1%E4%BD%8F.html
如图, 当文章比较短的时候, 按照逻辑应该是不显示评论按钮, 但是却居中显示了, 应该是BUG
当切换到一个较长的文章, 再重新切换回出现问题的短文章时, 评论按钮就被隐藏了.
我现在有:
我应该如何在一个press下自由切换。
复现步骤:
pnpm up @sugarat/theme
pnpm add vitepress@latest
package.json
{
"name": "vitepress-blog",
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "vitepress dev docs",
"build": "vitepress build docs",
"serve": "vitepress serve docs"
},
"dependencies": {
"@element-plus/icons-vue": "^2.1.0",
"@sugarat/theme": "^0.1.50",
"element-plus": "^2.4.1",
"vue": "^3.3.7"
},
"devDependencies": {
"sass": "^1.69.5",
"typescript": "^4.9.5",
"vitepress": "1.0.0-rc.24"
},
"author": "Deer404",
"license": "MIT"
}
报错信息
failed to load config from /Volumes/DataDocument/CodeSpace/Deer404/blog_vitepress/docs/.vitepress/config.ts
failed to start server. error:
Error [ERR_REQUIRE_ESM]: require() of ES Module /Volumes/DataDocument/CodeSpace/Deer404/blog_vitepress/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/vitepress-plugin-mermaid/dist/vitepress-plugin-mermaid.umd.js from /Volumes/DataDocument/CodeSpace/Deer404/blog_vitepress/node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@sugarat/theme/node.js not supported.
vitepress-plugin-mermaid.umd.js is treated as an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which declares all .js files in that package scope as ES modules.
Instead rename vitepress-plugin-mermaid.umd.js to end in .cjs, change the requiring code to use dynamic import() which is available in all CommonJS modules, or change "type": "module" to "type": "commonjs" in /Volumes/DataDocument/CodeSpace/Deer404/blog_vitepress/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/vitepress-plugin-mermaid/package.json to treat all .js files as CommonJS (using .mjs for all ES modules instead).
at _require.extensions.<computed> [as .js] (file:///Volumes/DataDocument/CodeSpace/Deer404/blog_vitepress/node_modules/.pnpm/[email protected][email protected]/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:66343:17)
at getMarkdownPlugins (/Volumes/DataDocument/CodeSpace/Deer404/blog_vitepress/node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@sugarat/theme/node.js:296:35)
at getThemeConfig (/Volumes/DataDocument/CodeSpace/Deer404/blog_vitepress/node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@sugarat/theme/node.js:583:26)
at Object.<anonymous> (/Volumes/DataDocument/CodeSpace/Deer404/blog_vitepress/docs/.vitepress/config.ts:26:48)
at _require.extensions.<computed> [as .js] (file:///Volumes/DataDocument/CodeSpace/Deer404/blog_vitepress/node_modules/.pnpm/[email protected][email protected]/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:66340:24)
at loadConfigFromBundledFile (file:///Volumes/DataDocument/CodeSpace/Deer404/blog_vitepress/node_modules/.pnpm/[email protected][email protected]/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:66348:21)
at async loadConfigFromFile (file:///Volumes/DataDocument/CodeSpace/Deer404/blog_vitepress/node_modules/.pnpm/[email protected][email protected]/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:66171:28)
at async resolveUserConfig (file:///Volumes/DataDocument/CodeSpace/Deer404/blog_vitepress/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/vitepress/dist/node/serve-FiwKdDMo.js:19878:27)
at async resolveConfig (file:///Volumes/DataDocument/CodeSpace/Deer404/blog_vitepress/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/vitepress/dist/node/serve-FiwKdDMo.js:19811:48)
at async createServer (file:///Volumes/DataDocument/CodeSpace/Deer404/blog_vitepress/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/vitepress/dist/node/serve-FiwKdDMo.js:70084:18)
at async createDevServer (file:///Volumes/DataDocument/CodeSpace/Deer404/blog_vitepress/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected]/node_modules/vitepress/dist/node/cli.js:405:20)
我在docs/.vitepress/config.ts的const blogTheme = getThemeConfig({nav:[{text:'home',link:'/'}]....
不起作用呢
不支持0.22.4版本吗
复现步骤:
/?tag=javascript&type=warning
VPNavBarTitle
区域,url去掉了标签,url变成了: /
b47b213 introduced this code:
if (!code.includes(options?.ssr ? '_push(`' : '_createElementBlock("div", null')) {
// ...
return code.replace('_createElementBlock("div", null', `_createElementBlock("div", ${stringify(attrs)}`)
This code assumes the Vue rendering code is of the format _createElementBlock("div", null, [ ... ])
.
However, on out system, the rendering code is simply outputting a single, empty DIV tag. This uses the simplified function signature _createElementBlock("div")
. Example:
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return (_openBlock(), _createElementBlock("div"))
}
This results in every page issuing this warning:
[plugin:vitepress-plugin-pagefind] [plugin vitepress-plugin-pagefind] docs/core/admin/index.md: Client /foo/docs/core/admin/index.md may not be a valid file, will not be indexed, please contact the author for assistance
And the second replace call fails.
Solution: Replace code needs to check for both function signatures.
会出现may not be a valid file, will not be indexed, please contact the author for assistance
去掉lang="ts"
即可,但还是希望解决,谢谢
如果只去掉setup
,也不会报错~但我的vue组件就显示不出来了
另外,对自定义vue组件的支持不太好,我这好像只能索引到vue组件里最后一个h标签及其之后的内容,没继续深入研究,而vitepress自带搜索能搜到全部内容
最后,希望内容预览能像原版那样带css样式带图片
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.