Skip to content

Commit

Permalink
Merge branch 'main' of github.com:walinejs/waline
Browse files Browse the repository at this point in the history
  • Loading branch information
lizheming committed Jun 13, 2024
2 parents d7735b0 + c94ad89 commit 2e91c86
Show file tree
Hide file tree
Showing 112 changed files with 958 additions and 1,127 deletions.
1 change: 1 addition & 0 deletions .markdownlint-cli2.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export default {
'script',
'span',
'BiliBili',
'Catalog',
'MigrationTool',
'VidStack',
],
Expand Down
15 changes: 8 additions & 7 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,18 @@
},
"devDependencies": {
"@fancyapps/ui": "5.0.36",
"@vuepress/bundler-vite": "2.0.0-rc.12",
"@vuepress/helper": "2.0.0-rc.31",
"@vuepress/plugin-docsearch": "2.0.0-rc.31",
"@vuepress/plugin-redirect": "2.0.0-rc.31",
"@vuepress/bundler-vite": "2.0.0-rc.13",
"@vuepress/helper": "2.0.0-rc.34",
"@vuepress/plugin-comment": "2.0.0-rc.34",
"@vuepress/plugin-docsearch": "2.0.0-rc.34",
"@vuepress/plugin-redirect": "2.0.0-rc.34",
"@waline/client": "workspace:*",
"marked": "12.0.2",
"mathjax-full": "3.2.2",
"vidstack": "1.11.21",
"vue": "3.4.27",
"vuepress": "2.0.0-rc.12",
"vuepress-shared": "2.0.0-rc.45",
"vuepress-theme-hope": "2.0.0-rc.46"
"vuepress": "2.0.0-rc.13",
"vuepress-shared": "2.0.0-rc.48",
"vuepress-theme-hope": "2.0.0-rc.48"
}
}
15 changes: 15 additions & 0 deletions docs/src/.vuepress/client.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
import { Fancybox } from '@fancyapps/ui/dist/fancybox/fancybox.esm.js';
import {
type WalineOptions,
defineWalineConfig,
} from '@vuepress/plugin-comment/client';
import { onBeforeUnmount, onMounted } from 'vue';
import { defineClientConfig } from 'vuepress/client';

export const walineOptions: WalineOptions = {
login: 'force',
serverURL: 'https://walinejs.comment.lithub.cc',
recaptchaV3Key: '6Lfz4-shAAAAANgsYRR0datkzv6zLIaKrSqfHsiG',
comment: true,
pageview: true,
reaction: true,
};

defineWalineConfig(walineOptions);

export default defineClientConfig({
setup() {
onMounted(() => Fancybox.bind('#vp-comment .wl-content img'));
Expand Down
3 changes: 0 additions & 3 deletions docs/src/.vuepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { viteBundler } from '@vuepress/bundler-vite';
import { redirectPlugin } from '@vuepress/plugin-redirect';
import { defineUserConfig } from 'vuepress';
import { path } from 'vuepress/utils';

Expand Down Expand Up @@ -29,8 +28,6 @@ export default defineUserConfig({

theme,

plugins: [redirectPlugin()],

alias: {
'@MigrationTool': path.resolve(__dirname, './components/MigrationTool.vue'),
'@theme-hope/components/HomePage': path.resolve(
Expand Down
208 changes: 16 additions & 192 deletions docs/src/.vuepress/sidebar.ts
Original file line number Diff line number Diff line change
@@ -1,105 +1,12 @@
import { sidebar } from 'vuepress-theme-hope';

export const zhSidebarConfig = sidebar({
'/cookbook/': [
{
text: '导入',
icon: 'import',
prefix: 'import/',
children: ['cdn', 'project'],
},
'syntax',
{
text: '自定义',
icon: 'customize',
prefix: 'customize/',
children: [
'emoji',
'locale',
'highlighter',
'image-preview',
'search',
'tex-renderer',
'upload-image',
'database',
'userdb',
],
},
'reactivity',
],
'/guide/': [
{
text: '快速上手',
icon: 'creative',
prefix: 'get-started/',
children: ['', 'client', 'server'],
},
{
text: '功能',
icon: 'feature',
prefix: 'features/',
children: [
'syntax',
'emoji',
'search',
'reaction',
'label',
'i18n',
'pageview',
'comment',
'safety',
'notification',
'style',
'widget/',
],
},
'database',
{
text: '部署',
icon: 'deploy',
prefix: 'deploy/',
children: [
'vercel',
'cloudbase',
'deta',
'railway',
'zeabur',
'netlify',
'baidu-cfc',
'aliyun-fc',
'vps',
],
},
],
'/': [
{
text: '指南',
icon: 'creative',
prefix: 'guide/',
children: [
'get-started/',
{
text: '功能',
icon: 'feature',
prefix: 'features/',
children: [
'syntax',
'emoji',
'search',
'reaction',
'label',
'i18n',
'pageview',
'comment',
'safety',
'notification',
'style',
'widget/',
],
},
'database',
'deploy/',
],
children: ['get-started/', 'features/', 'database', 'deploy/'],
},
'cookbook/',
{
Expand Down Expand Up @@ -129,106 +36,23 @@ export const zhSidebarConfig = sidebar({
collapsible: true,
children: ['v3', 'v2', 'valine', 'tool'],
},
{
text: '高级',
icon: 'advanced',
prefix: 'advanced/',
collapsible: true,
children: ['intro', 'design', 'ecosystem', 'faq', 'contribution'],
},
'advanced/',
],

'/advanced/': 'structure',

'/cookbook/': 'structure',

'/guide/': 'structure',
});

export const enSidebarConfig = sidebar({
'/en/cookbook/': [
{
text: 'Import',
icon: 'import',
prefix: 'import/',
children: ['cdn', 'project'],
},
'syntax',
{
text: 'Customize',
icon: 'customize',
prefix: 'customize/',
children: [
'emoji',
'locale',
'highlighter',
'image-preview',
'search',
'tex-renderer',
'upload-image',
'database',
'userdb',
],
},
'reactivity',
],
'/en/guide/': [
{
text: 'Get Started',
icon: 'creative',
prefix: 'get-started/',
children: ['', 'client', 'server'],
},
{
text: 'Features',
icon: 'feature',
prefix: 'features/',
children: [
'syntax',
'emoji',
'search',
'reaction',
'label',
'i18n',
'pageview',
'comment',
'safety',
'notification',
'style',
'widget/',
],
},
'database',
{
text: 'Deploy',
icon: 'deploy',
prefix: 'deploy/',
children: ['vercel', 'deta', 'railway', 'zeabur', 'netlify', 'vps'],
},
],
'/en/': [
{
text: 'Guide',
icon: 'creative',
prefix: 'guide/',
children: [
'get-started/',
{
text: 'Features',
icon: 'feature',
prefix: 'features/',
children: [
'syntax',
'emoji',
'search',
'reaction',
'label',
'i18n',
'pageview',
'comment',
'safety',
'notification',
'style',
'widget/',
],
},
'database',
'deploy/',
],
children: ['get-started/', 'features/', 'database', 'deploy/'],
},
'cookbook/',
{
Expand Down Expand Up @@ -258,12 +82,12 @@ export const enSidebarConfig = sidebar({
collapsible: true,
children: ['v3', 'v2', 'valine', 'tool'],
},
{
text: 'Advanced',
icon: 'advanced',
prefix: 'advanced/',
collapsible: true,
children: ['intro', 'design', 'ecosystem', 'faq', 'contribution'],
},
'advanced/',
],

'/en/advanced/': 'structure',

'/en/cookbook/': 'structure',

'/en/guide/': 'structure',
});
12 changes: 5 additions & 7 deletions docs/src/.vuepress/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default hopeTheme(
{
hostname: 'https://waline.js.org',
favicon: '/favicon.ico',
iconAssets: '//at.alicdn.com/t/c/font_3180165_u7vein90ekb.css',
iconAssets: '//at.alicdn.com/t/c/font_3180165_6o97v6oir2j.css',

logo: '/logo.png',
repo: 'walinejs/waline',
Expand Down Expand Up @@ -38,12 +38,6 @@ export default hopeTheme(
plugins: {
comment: {
provider: 'Waline',
login: 'force',
serverURL: 'https://walinejs.comment.lithub.cc',
recaptchaV3Key: '6Lfz4-shAAAAANgsYRR0datkzv6zLIaKrSqfHsiG',
comment: true,
pageview: true,
reaction: true,
locales: {
'/': {
admin: '可爱的管理员',
Expand Down Expand Up @@ -84,6 +78,10 @@ export default hopeTheme(
sup: true,
tasklist: true,
},

redirect: {
switchLocale: 'modal',
},
},
},
{ custom: true },
Expand Down
2 changes: 1 addition & 1 deletion docs/src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ features:
details: 通过 <1kb 代码可靠统计文章浏览量
link: /guide/features/pageview.html

footer: GPL-2.0 协议 | Copyright © 2020-present <a href="https://github.com/lizheming" rel="noopener noreferrer " target="_blank">lizheming</a> | 主题使用 <a href="https://vuepress-theme-hope.github.io/v2/zh/" rel="noopener noreferrer " target="_blank">vuepress-theme-hope</a>
footer: GPL-2.0 协议 | Copyright © 2020-present <a href="https://github.com/lizheming" rel="noopener noreferrer " target="_blank">lizheming</a> | 主题使用 <a href="https://vuepress-theme-hope.github.io/v2/zh/" rel="noopener noreferrer " target="_blank">VuePress Theme Hope</a>
---
7 changes: 7 additions & 0 deletions docs/src/advanced/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: 高级
icon: advanced
index: false
---

<Catalog />
2 changes: 1 addition & 1 deletion docs/src/advanced/contribution.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: 贡献指南
icon: contribute
redirectFrom: /reference/contribution.html
order: -1
---

欢迎大家为 waline 提交 Pull Request!:tada:
Expand Down
2 changes: 1 addition & 1 deletion docs/src/advanced/design.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: 设计目标
icon: goal
redirectFrom: /advanced/why.html
order: 2
---

## Valine
Expand Down
1 change: 1 addition & 0 deletions docs/src/advanced/ecosystem.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: 生态系统
icon: ecosystem
order: 3
---

Waline 是经典的前后端分离 Client/Server 架构,提供了较为完善的 API 接口。你可以基于服务端提供的 API 自行实现自己的客户端实现。
Expand Down
1 change: 1 addition & 0 deletions docs/src/advanced/faq.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: FAQ
icon: faq
order: 4
---

Waline 诞生之初就已经作了很明确的定位:
Expand Down
Loading

0 comments on commit 2e91c86

Please sign in to comment.