怎么在vitepress中部署 waline评论,希望各位大佬能教我一下 || How to deploy waline in vitepress, I hope you guys can teach me #2752
-
问题描述 | Describe the bug怎么在vitepress中部署 waline评论 问题网站 | Website URL服务部署在哪里? | Where your waline deploy?Vercel (Default) 数据存储在哪里?| Where your comment data store?LeanCloud(https://leancloud.app) Problem description | Describe the bugHow to deploy waline comments in vitepress Question Website | Website URLWhere is the service deployed? | Where your waline deploy?Vercel (Default) Where is the data stored? | Where your comment data store?LeanCloud(https://leancloud.app) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
没有用过vitepres,这是bing的第一条。https://j33h22.github.io/Articles/Technolgies/VitePress-Waline 看着挺简单的。 I have never used vitepres before, this is the first one for Bing. https://j33h22.github.io/Articles/Technolgies/VitePress-Waline It looks pretty simple. |
Beta Was this translation helpful? Give feedback.
-
|
import Waline from './components/Waline.vue'
// ...
export default {
extends: DefaultTheme,
Layout: () => {
const LayoutWrapper = {
setup() {
return () => h(DefaultTheme.Layout, null, {
// ...
'doc-after': () => h(Waline),
// ...
})
}
}
return h(LayoutWrapper)
},
enhanceApp({ app, router }) {
app.component('Waline', Waline)
}
},基础应该就行了 In import Waline from './components/Waline.vue'
// ...
export default {
extends: DefaultTheme,
Layout: () => {
const LayoutWrapper = {
setup() {
return () => h(DefaultTheme.Layout, null, {
// ...
'doc-after': () => h(Waline),
// ...
})
}
}
return h(LayoutWrapper)
},
enhanceApp({ app, router }) {
app.component('Waline', Waline)
}
},The basics should be enough |
Beta Was this translation helpful? Give feedback.
/.vitepress/theme/components里,建一个Waline.vue,内容抄官方文档,const serverURL填从外部可调用的Waline服务端网址,然后/.vitepress/theme/index.ts里:h函数法:
基础应该就行了
In
/.vitepress/theme/components, create aWaline.vue,…