├── .devcontainer └── devcontainer.json ├── .env.example ├── .github ├── DISCUSSION_TEMPLATE │ └── q-a.yml ├── ISSUE_TEMPLATE │ ├── bug-report.yml │ ├── config.yml │ └── feature-request.yml ├── renovate.json ├── stale.yml └── workflows │ ├── codeql-analysis.yml │ ├── docker-test.yml │ ├── docs-deploy.yml │ ├── issue-check-inactive.yml │ ├── issue-labeled.yml │ ├── release-admin.yml │ ├── release-api.yml │ ├── release-client.yml │ ├── release-server.yml │ ├── test.yml │ └── translator.yml ├── .gitignore ├── .husky ├── commit-msg └── pre-commit ├── .markdownlint-cli2.mjs ├── .markdownlintignore ├── .prettierignore ├── .stylelintrc.yml ├── .vscode └── settings.json ├── CHANGELOG.md ├── LICENSE ├── README.md ├── README_CN.md ├── assets ├── logo.png ├── logo.webp ├── qqgroup.jpg ├── waline.pgsql ├── waline.png ├── waline.sql ├── waline.sqlite └── waline.tidb ├── commitlint.config.ts ├── docs ├── README.md ├── package.json ├── src │ ├── .vuepress │ │ ├── client.ts │ │ ├── components │ │ │ ├── MigrationTool.vue │ │ │ ├── WalineTips.scss │ │ │ └── WalineTips.ts │ │ ├── config.ts │ │ ├── navbar.ts │ │ ├── public │ │ │ ├── assets │ │ │ │ └── icon │ │ │ │ │ ├── apple-icon-152.png │ │ │ │ │ ├── apple-touch-icon.png │ │ │ │ │ ├── chrome-192.png │ │ │ │ │ ├── chrome-512.png │ │ │ │ │ ├── chrome-mask-192.png │ │ │ │ │ ├── chrome-mask-512.png │ │ │ │ │ ├── favicon-16x16.png │ │ │ │ │ ├── favicon-32x32.png │ │ │ │ │ ├── guide-maskable.png │ │ │ │ │ ├── guide-monochrome.png │ │ │ │ │ └── ms-icon-144.png │ │ │ ├── favicon.ico │ │ │ ├── google8b3d888472d9b77d.html │ │ │ ├── logo.png │ │ │ ├── logo.webp │ │ │ └── manifest.webmanifest │ │ ├── shims-fancy-box.d.ts │ │ ├── shims-vue.d.ts │ │ ├── sidebar.ts │ │ ├── styles │ │ │ ├── config.scss │ │ │ ├── fancybox.scss │ │ │ └── index.scss │ │ ├── theme.ts │ │ └── utils │ │ │ ├── csv.js │ │ │ ├── exportRaw.ts │ │ │ ├── index.ts │ │ │ └── transform │ │ │ ├── artalk2lc.ts │ │ │ ├── commento2lc.ts │ │ │ ├── disqus2lc.ts │ │ │ ├── index.ts │ │ │ ├── lc2csv.ts │ │ │ ├── lc2tcb.ts │ │ │ └── tk2lc.ts │ ├── README.md │ ├── advanced │ │ ├── README.md │ │ ├── assets │ │ │ ├── cloudbase-update.jpg │ │ │ └── vercel-update.png │ │ ├── contribution.md │ │ ├── design.md │ │ ├── ecosystem.md │ │ ├── faq.md │ │ ├── intro.md │ │ └── privacy.md │ ├── assets │ │ ├── aliyun-computenest-1.png │ │ ├── aliyun-computenest-2.png │ │ ├── aliyun-computenest-3.png │ │ ├── aliyun-computenest-4.png │ │ ├── aliyun-computenest-en-1.png │ │ ├── aliyun-computenest-en-2.png │ │ ├── aliyun-computenest-en-3.png │ │ ├── aliyun-computenest-en-4.png │ │ ├── aliyun-fc-1.jpg │ │ ├── aliyun-fc-2.jpg │ │ ├── aliyun-fc-3.jpg │ │ ├── aliyun-fc-4.jpg │ │ ├── aliyun-fc-5.jpg │ │ ├── aliyun-fc-6.jpg │ │ ├── aliyun-fc-7.jpg │ │ ├── aliyun-fc-8.jpg │ │ ├── baidu-cfc-1.jpg │ │ ├── baidu-cfc-10.jpg │ │ ├── baidu-cfc-11.jpg │ │ ├── baidu-cfc-2.jpg │ │ ├── baidu-cfc-3.jpg │ │ ├── baidu-cfc-4.jpg │ │ ├── baidu-cfc-5.jpg │ │ ├── baidu-cfc-6.jpg │ │ ├── baidu-cfc-7.jpg │ │ ├── baidu-cfc-8.jpg │ │ ├── baidu-cfc-9.jpg │ │ ├── netlify-1.png │ │ ├── netlify-10.png │ │ ├── netlify-2.png │ │ ├── netlify-3.png │ │ ├── netlify-4.png │ │ ├── netlify-5.png │ │ ├── netlify-6.png │ │ ├── netlify-8.png │ │ ├── netlify-9.png │ │ ├── railway-1.jpg │ │ ├── railway-2.jpg │ │ ├── railway-3.jpg │ │ ├── railway-4.jpg │ │ ├── tidb-1.png │ │ ├── tidb-2.png │ │ ├── tidb-3.png │ │ ├── tidb-4.png │ │ ├── tidb-5.png │ │ ├── tidb-6.png │ │ ├── tidb-7.png │ │ ├── vercel-1.png │ │ ├── vercel-2.png │ │ ├── vercel-3.png │ │ ├── vercel-4.png │ │ ├── vercel-5.png │ │ ├── vercel-6.png │ │ ├── vercel-7.png │ │ ├── vercel-8.png │ │ ├── vercel-9.png │ │ ├── zeabur-1.png │ │ ├── zeabur-10.png │ │ ├── zeabur-11.png │ │ ├── zeabur-2.png │ │ ├── zeabur-3.png │ │ ├── zeabur-4.png │ │ ├── zeabur-5.png │ │ ├── zeabur-6.png │ │ ├── zeabur-7.png │ │ ├── zeabur-8.png │ │ └── zeabur-9.png │ ├── cookbook │ │ ├── README.md │ │ ├── customize │ │ │ ├── README.md │ │ │ ├── database.md │ │ │ ├── emoji.md │ │ │ ├── highlighter.md │ │ │ ├── image-preview.md │ │ │ ├── locale.md │ │ │ ├── search.md │ │ │ ├── tex-renderer.md │ │ │ ├── upload-image.md │ │ │ └── userdb.md │ │ ├── import │ │ │ ├── README.md │ │ │ ├── cdn.md │ │ │ └── project.md │ │ ├── reactivity.md │ │ └── syntax.md │ ├── en │ │ ├── README.md │ │ ├── advanced │ │ │ ├── README.md │ │ │ ├── assets │ │ │ │ ├── cloudbase-update.jpg │ │ │ │ └── vercel-update.png │ │ │ ├── contribution.md │ │ │ ├── design.md │ │ │ ├── ecosystem.md │ │ │ ├── faq.md │ │ │ ├── intro.md │ │ │ └── privacy.md │ │ ├── cookbook │ │ │ ├── README.md │ │ │ ├── customize │ │ │ │ ├── README.md │ │ │ │ ├── database.md │ │ │ │ ├── emoji.md │ │ │ │ ├── highlighter.md │ │ │ │ ├── image-preview.md │ │ │ │ ├── locale.md │ │ │ │ ├── search.md │ │ │ │ ├── tex-renderer.md │ │ │ │ ├── upload-image.md │ │ │ │ └── userdb.md │ │ │ ├── import │ │ │ │ ├── README.md │ │ │ │ ├── cdn.md │ │ │ │ └── project.md │ │ │ ├── reactivity.md │ │ │ └── syntax.md │ │ ├── guide │ │ │ ├── database.md │ │ │ ├── deploy │ │ │ │ ├── README.md │ │ │ │ ├── aliyun-computenest.md │ │ │ │ ├── netlify.md │ │ │ │ ├── railway.md │ │ │ │ ├── tidb.md │ │ │ │ ├── vercel.md │ │ │ │ ├── vps.md │ │ │ │ └── zeabur.md │ │ │ ├── features │ │ │ │ ├── README.md │ │ │ │ ├── assets │ │ │ │ │ ├── label-admin.jpg │ │ │ │ │ └── label-profile.jpg │ │ │ │ ├── comment.md │ │ │ │ ├── emoji.md │ │ │ │ ├── i18n.md │ │ │ │ ├── label.md │ │ │ │ ├── notification.md │ │ │ │ ├── pageview.md │ │ │ │ ├── reaction.md │ │ │ │ ├── safety.md │ │ │ │ ├── search.md │ │ │ │ ├── style.md │ │ │ │ ├── syntax.md │ │ │ │ └── widget │ │ │ │ │ ├── README.md │ │ │ │ │ ├── recent-comment.md │ │ │ │ │ └── user-list.md │ │ │ └── get-started │ │ │ │ ├── README.md │ │ │ │ ├── assets │ │ │ │ ├── leancloud-1.png │ │ │ │ └── leancloud-2.png │ │ │ │ ├── client.md │ │ │ │ └── server.md │ │ ├── migration │ │ │ ├── tool.md │ │ │ ├── v2.md │ │ │ ├── v3.md │ │ │ └── valine.md │ │ └── reference │ │ │ ├── api │ │ │ └── README.md │ │ │ ├── client │ │ │ ├── api.md │ │ │ ├── file.md │ │ │ ├── props.md │ │ │ └── style.md │ │ │ └── server │ │ │ ├── api.md │ │ │ ├── config.md │ │ │ ├── env.md │ │ │ └── plugin.md │ ├── guide │ │ ├── database.md │ │ ├── deploy │ │ │ ├── README.md │ │ │ ├── aliyun-computenest.md │ │ │ ├── aliyun-fc.md │ │ │ ├── baidu-cfc.md │ │ │ ├── cloudbase.md │ │ │ ├── netlify.md │ │ │ ├── railway.md │ │ │ ├── tidb.md │ │ │ ├── vercel.md │ │ │ ├── vps.md │ │ │ └── zeabur.md │ │ ├── features │ │ │ ├── README.md │ │ │ ├── assets │ │ │ │ ├── label-admin.jpg │ │ │ │ └── label-profile.jpg │ │ │ ├── comment.md │ │ │ ├── emoji.md │ │ │ ├── i18n.md │ │ │ ├── label.md │ │ │ ├── notification.md │ │ │ ├── pageview.md │ │ │ ├── reaction.md │ │ │ ├── safety.md │ │ │ ├── search.md │ │ │ ├── style.md │ │ │ ├── syntax.md │ │ │ └── widget │ │ │ │ ├── README.md │ │ │ │ ├── recent-comment.md │ │ │ │ └── user-list.md │ │ └── get-started │ │ │ ├── README.md │ │ │ ├── assets │ │ │ ├── leancloud-1.png │ │ │ ├── leancloud-2.png │ │ │ └── leancloud-3.png │ │ │ ├── client.md │ │ │ └── server.md │ ├── migration │ │ ├── tool.md │ │ ├── v2.md │ │ ├── v3.md │ │ └── valine.md │ └── reference │ │ ├── api │ │ └── README.md │ │ ├── client │ │ ├── api.md │ │ ├── file.md │ │ ├── props.md │ │ └── style.md │ │ └── server │ │ ├── api.md │ │ ├── config.md │ │ ├── env.md │ │ └── plugin.md └── tsconfig.json ├── eslint.config.js ├── example ├── .env.example ├── .gitignore ├── README.md ├── index.cjs ├── package.json ├── robots.txt └── vercel.json ├── package.json ├── packages ├── admin │ ├── .babelrc │ ├── index.html │ ├── package.json │ ├── src │ │ ├── App.jsx │ │ ├── components │ │ │ ├── Header.jsx │ │ │ ├── Paginator.jsx │ │ │ ├── icon │ │ │ │ ├── facebook.svg │ │ │ │ ├── github.svg │ │ │ │ ├── index.js │ │ │ │ ├── qq.svg │ │ │ │ ├── twitter.svg │ │ │ │ └── weibo.svg │ │ │ ├── useCaptcha.js │ │ │ ├── useRecaptchaV3.js │ │ │ ├── useScript.js │ │ │ └── useTurnstile.js │ │ ├── i18n.js │ │ ├── img │ │ │ ├── ajax-loader.gif │ │ │ ├── icons.png │ │ │ └── icons@2x.png │ │ ├── index.jsx │ │ ├── locales │ │ │ ├── en.json │ │ │ ├── index.js │ │ │ ├── zh-CN.json │ │ │ └── zh-TW.json │ │ ├── pages │ │ │ ├── forgot │ │ │ │ └── index.jsx │ │ │ ├── login │ │ │ │ └── index.jsx │ │ │ ├── manage-comments │ │ │ │ ├── index.jsx │ │ │ │ └── utils.js │ │ │ ├── migration │ │ │ │ └── index.jsx │ │ │ ├── profile │ │ │ │ ├── index.jsx │ │ │ │ └── twoFactorAuth.jsx │ │ │ ├── register │ │ │ │ └── index.jsx │ │ │ └── user │ │ │ │ └── index.jsx │ │ ├── services │ │ │ ├── auth.js │ │ │ ├── comment.js │ │ │ └── user.js │ │ ├── store │ │ │ ├── index.js │ │ │ └── user.js │ │ ├── style │ │ │ ├── custom.scss │ │ │ ├── grid.css │ │ │ ├── index.scss │ │ │ ├── normalize.css │ │ │ └── style.css │ │ └── utils │ │ │ ├── download.js │ │ │ ├── readFileAsync.js │ │ │ └── request.js │ └── vite.config.ts ├── api │ ├── package.json │ ├── rollup.config.ts │ ├── src │ │ ├── articleCounter.ts │ │ ├── comment.ts │ │ ├── commentCount.ts │ │ ├── index.ts │ │ ├── login.ts │ │ ├── pageview.ts │ │ ├── recentComment.ts │ │ ├── typings.ts │ │ ├── user.ts │ │ └── utils.ts │ └── tsconfig.json ├── client │ ├── .env.example │ ├── LICENSE │ ├── README.md │ ├── __tests__ │ │ ├── __fixtures__ │ │ │ └── emojiMap.ts │ │ ├── comment.html │ │ ├── emoji.spec.ts │ │ ├── highlighter.html │ │ ├── init.html │ │ ├── katex.html │ │ ├── markedMathExtension.spec.ts │ │ ├── mathjax.html │ │ ├── pageview.html │ │ ├── widget.html │ │ └── wordCount.spec.ts │ ├── package.json │ ├── rollup.config.ts │ ├── src │ │ ├── comment.ts │ │ ├── components │ │ │ ├── ArticleReaction.vue │ │ │ ├── CommentBox.vue │ │ │ ├── CommentCard.vue │ │ │ ├── Icons.ts │ │ │ ├── ImageWall.vue │ │ │ └── WalineComment.vue │ │ ├── composables │ │ │ ├── index.ts │ │ │ ├── inputs.ts │ │ │ ├── like.ts │ │ │ ├── reaction.ts │ │ │ ├── recaptchaV3.ts │ │ │ ├── turnstile.ts │ │ │ └── userInfo.ts │ │ ├── config │ │ │ ├── default.ts │ │ │ ├── highlighter.ts │ │ │ ├── i18n │ │ │ │ ├── de.ts │ │ │ │ ├── en.ts │ │ │ │ ├── es.ts │ │ │ │ ├── fr.ts │ │ │ │ ├── generate.ts │ │ │ │ ├── index.ts │ │ │ │ ├── jp.ts │ │ │ │ ├── pt-BR.ts │ │ │ │ ├── ru.ts │ │ │ │ ├── vi-VN.ts │ │ │ │ ├── zh-CN.ts │ │ │ │ └── zh-TW.ts │ │ │ ├── index.ts │ │ │ └── sortKey.ts │ │ ├── entries │ │ │ ├── comment.ts │ │ │ ├── component-type.d.ts │ │ │ ├── component.ts │ │ │ ├── full.ts │ │ │ ├── init.ts │ │ │ └── pageview.ts │ │ ├── init.ts │ │ ├── pageview.ts │ │ ├── shims-vue.d.ts │ │ ├── styles │ │ │ ├── base.scss │ │ │ ├── card.scss │ │ │ ├── config.scss │ │ │ ├── emoji.scss │ │ │ ├── gif.scss │ │ │ ├── helpers │ │ │ │ └── _svg.scss │ │ │ ├── highlight.scss │ │ │ ├── index.scss │ │ │ ├── layout.scss │ │ │ ├── meta.scss │ │ │ ├── normalize.scss │ │ │ ├── panel.scss │ │ │ ├── reaction.scss │ │ │ ├── recent.scss │ │ │ └── user-list.scss │ │ ├── typings │ │ │ ├── base.ts │ │ │ ├── index.ts │ │ │ ├── locale.ts │ │ │ ├── options.ts │ │ │ └── waline.ts │ │ ├── utils │ │ │ ├── config.ts │ │ │ ├── darkmode.ts │ │ │ ├── date.ts │ │ │ ├── email.ts │ │ │ ├── emoji.ts │ │ │ ├── error.ts │ │ │ ├── getRoot.ts │ │ │ ├── image.ts │ │ │ ├── index.ts │ │ │ ├── markdown.ts │ │ │ ├── markedMathExtension.ts │ │ │ ├── path.ts │ │ │ ├── query.ts │ │ │ ├── type.ts │ │ │ ├── userAgent.ts │ │ │ └── wordCount.ts │ │ ├── version.ts │ │ └── widgets │ │ │ ├── index.ts │ │ │ ├── recentComments.ts │ │ │ └── userList.ts │ ├── template │ │ ├── comment.html │ │ ├── icon.html │ │ ├── index.html │ │ ├── init.html │ │ ├── pageview.html │ │ └── widget.html │ ├── tsconfig.json │ └── vite.config.ts ├── cloudbase │ ├── .eslintrc.yml │ ├── index.js │ └── package.json ├── hexo-next │ ├── README.md │ ├── default.yaml │ ├── index.js │ ├── package.json │ └── waline.njk └── server │ ├── .gitignore │ ├── Dockerfile │ ├── Dockerfile.alpine │ ├── Dockerfile.source-build-alpine │ ├── README.md │ ├── __tests__ │ ├── __snapshots__ │ │ └── xss.spec.js.snap │ └── xss.spec.js │ ├── development.js │ ├── docker-compose.yml │ ├── index.js │ ├── package.json │ ├── src │ ├── config │ │ ├── adapter.js │ │ ├── config.js │ │ ├── extend.js │ │ ├── middleware.js │ │ ├── netlify.js │ │ └── router.js │ ├── controller │ │ ├── article.js │ │ ├── comment.js │ │ ├── db.js │ │ ├── index.js │ │ ├── oauth.js │ │ ├── rest.js │ │ ├── token.js │ │ ├── token │ │ │ └── 2fa.js │ │ ├── user.js │ │ ├── user │ │ │ └── password.js │ │ └── verification.js │ ├── extend │ │ ├── controller.js │ │ └── think.js │ ├── locales │ │ ├── en.json │ │ ├── index.js │ │ ├── zh-CN.json │ │ └── zh-TW.json │ ├── logic │ │ ├── article.js │ │ ├── base.js │ │ ├── comment.js │ │ ├── db.js │ │ ├── oauth.js │ │ ├── token.js │ │ ├── token │ │ │ └── 2fa.js │ │ ├── user.js │ │ └── user │ │ │ └── password.js │ ├── middleware │ │ ├── dashboard.js │ │ ├── plugin.js │ │ ├── prefix-warning.js │ │ └── version.js │ └── service │ │ ├── akismet.js │ │ ├── avatar.js │ │ ├── markdown │ │ ├── highlight.js │ │ ├── index.js │ │ ├── mathCommon.js │ │ ├── mathjax.js │ │ ├── utils.js │ │ └── xss.js │ │ ├── notify.js │ │ └── storage │ │ ├── base.js │ │ ├── cloudbase.js │ │ ├── deta.js │ │ ├── github.js │ │ ├── leancloud.js │ │ ├── mongodb.js │ │ ├── mysql.js │ │ ├── postgresql.js │ │ ├── sqlite.js │ │ └── tidb.js │ └── vanilla.js ├── pnpm-lock.yaml ├── pnpm-workspace.yaml ├── scripts ├── thinkjs-mock.js └── workspace-publish.js ├── tsconfig.base.json ├── tsconfig.eslint.json ├── tsconfig.json └── vitest.config.ts /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Waline Workspace", 3 | "updateContentCommand": "pnpm i", 4 | "postAttachCommand": "pnpm run client:dev", 5 | "forwardPorts": [5173], 6 | "portsAttributes": { 7 | "5173": { 8 | "label": "Waline Client", 9 | "onAutoForward": "openPreview" 10 | } 11 | }, 12 | "customizations": { 13 | "codespaces": { 14 | "openFiles": ["packages/client/src/init.ts"] 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | LEAN_ID= 2 | LEAN_KEY= 3 | LEAN_MASTER_KEY= 4 | LEAN_SERVER= 5 | -------------------------------------------------------------------------------- /.github/DISCUSSION_TEMPLATE/q-a.yml: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Q: ' 3 | labels: 4 | - question 5 | body: 6 | - type: textarea 7 | id: description 8 | attributes: 9 | label: Describe the bug | 问题描述 10 | description: A clear and concise description of what the bug is. | 请描述你的问题现象 11 | validations: 12 | required: true 13 | 14 | - type: input 15 | id: url 16 | attributes: 17 | label: Website URL | 问题网站 18 | description: Please supply a website url which can reproduce problem. | 请提供下可复现网站地址 19 | placeholder: ex. https://waline.js.org/en/ 20 | validations: 21 | required: true 22 | 23 | - type: markdown 24 | attributes: 25 | value: | 26 | ## Deploy Type | 部署方式 27 | 28 | - type: dropdown 29 | id: server 30 | validations: 31 | required: true 32 | attributes: 33 | label: Where your waline deploy? | 服务部署在哪里? 34 | options: 35 | - Vercel (Default) 36 | - CloudBase 37 | - Docker 38 | - Self Host 39 | - Baidu CFC 40 | - Aliyun FC 41 | - Render 42 | - Railway.app 43 | - Zeabur 44 | - Netlify 45 | - Other 46 | 47 | - type: dropdown 48 | id: database 49 | validations: 50 | required: true 51 | attributes: 52 | label: Where your comment data store? | 数据存储在哪里? 53 | options: 54 | - LeanCloud(https://leancloud.app) 55 | - LeanCloud(https://leancloud.cn) 56 | - CloudBase 57 | - MongoDB 58 | - MySQL 59 | - SQLite 60 | - PostgreSQL 61 | - GitHub 62 | - TiDB 63 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Questions about waline 4 | url: https://github.com/walinejs/waline/discussions/new 5 | about: Please ask questions in Discussion. 6 | 7 | - name: 官方 QQ 群 8 | url: https://jq.qq.com/?_wv=1027&k=l0NphanY 9 | about: '加入Waline 用户交流群: 673663898' 10 | 11 | - name: Telegram 12 | url: https://t.me/walinejs 13 | about: 'Official Telegram Group' 14 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature-request.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature Request 3 | description: Describe a feature you want 4 | title: '[Feature]: ' 5 | labels: 6 | - discussion 7 | - enhancement 8 | body: 9 | - type: textarea 10 | id: description 11 | attributes: 12 | label: 功能概述 | Describe the feature 13 | description: 请描述你需要的新功能 | A clear and concise description of what the feature is. 14 | validations: 15 | required: true 16 | -------------------------------------------------------------------------------- /.github/renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": [ 4 | "config:js-lib", 5 | ":semanticPrefixChore", 6 | ":prHourlyLimitNone", 7 | ":prConcurrentLimitNone", 8 | ":enableVulnerabilityAlerts", 9 | ":dependencyDashboard", 10 | "schedule:weekends" 11 | ], 12 | "packageRules": [ 13 | { 14 | "excludePackageNames": ["think-model-postgresql", "vuepress"], 15 | "excludePackagePrefixes": ["@mdit/", "@vuepress/", "vuepress-"], 16 | "matchPackagePatterns": ["*"] 17 | }, 18 | { 19 | "matchPackageNames": ["vite"], 20 | "matchUpdateTypes": ["patch"] 21 | } 22 | ], 23 | "lockFileMaintenance": { 24 | "enabled": true, 25 | "commitMessageAction": "update lockfile", 26 | "platformAutomerge": true, 27 | "extends": ["group:allNonMajor", "schedule:weekly"], 28 | "packageRules": [ 29 | { 30 | "excludePackageNames": ["vuepress"], 31 | "excludePackagePrefixes": ["@vuepress/", "vuepress-"], 32 | "matchPackagePatterns": ["*"] 33 | } 34 | ] 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /.github/stale.yml: -------------------------------------------------------------------------------- 1 | # Number of days of inactivity before an issue becomes stale 2 | daysUntilStale: 5 3 | # Number of days of inactivity before a stale issue is closed 4 | daysUntilClose: 2 5 | # Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled) 6 | onlyLabels: 7 | - needs more info 8 | - waiting for response 9 | # Comment to post when marking an issue as stale. Set to `false` to disable 10 | markComment: This issue has been automatically marked as stale because it needs to be responded while you have no recent activity. It will be closed if no further activity occurs. 11 | # Comment to post when closing a stale issue. Set to `false` to disable 12 | closeComment: false 13 | -------------------------------------------------------------------------------- /.github/workflows/docker-test.yml: -------------------------------------------------------------------------------- 1 | name: '[docker] CI for test' 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - main 7 | 8 | jobs: 9 | path-context: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Checkout 13 | uses: actions/checkout@v4 14 | 15 | - name: Set up QEMU 16 | uses: docker/setup-qemu-action@v3 17 | 18 | - name: Set up Docker Buildx 19 | uses: docker/setup-buildx-action@v3 20 | 21 | - name: Cache Docker layers 22 | uses: actions/cache@v4 23 | with: 24 | path: /tmp/.buildx-cache 25 | key: ${{ runner.os }}-buildx-${{ github.sha }} 26 | restore-keys: | 27 | ${{ runner.os }}-buildx- 28 | 29 | - name: Build alpine 30 | uses: docker/build-push-action@v6 31 | with: 32 | file: ./packages/server/Dockerfile.alpine 33 | platforms: linux/amd64,linux/arm64,linux/arm/v7 34 | cache-from: type=local,src=/tmp/.buildx-cache 35 | cache-to: type=local,dest=/tmp/.buildx-cache,mode=max 36 | 37 | - name: Build debian 38 | uses: docker/build-push-action@v6 39 | with: 40 | file: ./packages/server/Dockerfile 41 | platforms: linux/amd64,linux/arm64,linux/arm/v7 42 | cache-from: type=local,src=/tmp/.buildx-cache 43 | cache-to: type=local,dest=/tmp/.buildx-cache,mode=max 44 | -------------------------------------------------------------------------------- /.github/workflows/docs-deploy.yml: -------------------------------------------------------------------------------- 1 | name: Deploy theme docs 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | 8 | jobs: 9 | deploy-docs: 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - name: Checkout 14 | uses: actions/checkout@v4 15 | with: 16 | fetch-depth: 0 17 | 18 | - name: Install pnpm 19 | uses: pnpm/action-setup@v4 20 | 21 | - name: Install Node.js 22 | uses: actions/setup-node@v4 23 | with: 24 | node-version: 20 25 | cache: pnpm 26 | 27 | - name: Install Dependencies 28 | run: pnpm install --frozen-lockfile 29 | 30 | - name: Build API 31 | run: pnpm api:build 32 | 33 | - name: Build Client 34 | run: pnpm client:build 35 | 36 | - name: Build Docs 37 | run: |- 38 | pnpm docs:build 39 | > docs/src/.vuepress/dist/.nojekyll 40 | 41 | - name: Deploy 42 | uses: JamesIves/github-pages-deploy-action@v4 43 | with: 44 | branch: gh-pages 45 | folder: docs/src/.vuepress/dist 46 | ssh-key: ${{ secrets.SSH_TOKEN }} 47 | repository-name: walinejs/walinejs.github.io 48 | -------------------------------------------------------------------------------- /.github/workflows/issue-check-inactive.yml: -------------------------------------------------------------------------------- 1 | name: Issue Check Inactive 2 | 3 | on: 4 | schedule: 5 | - cron: '0 0 */15 * *' 6 | 7 | jobs: 8 | issue-check-inactive: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: check-inactive 12 | uses: actions-cool/issues-helper@v3 13 | with: 14 | actions: 'check-inactive' 15 | inactive-label: 'Inactive' 16 | inactive-day: 30 17 | -------------------------------------------------------------------------------- /.github/workflows/release-admin.yml: -------------------------------------------------------------------------------- 1 | name: 'publish @waline/admin' 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | paths: 8 | - .github/workflows/release-admin.yml 9 | - packages/admin/** 10 | 11 | permissions: 12 | contents: write 13 | id-token: write 14 | 15 | jobs: 16 | publish: 17 | runs-on: ubuntu-latest 18 | steps: 19 | - uses: actions/checkout@v4 20 | with: 21 | fetch-depth: 0 22 | - uses: pnpm/action-setup@v4 23 | - uses: actions/setup-node@v4 24 | with: 25 | node-version: 20 26 | cache: pnpm 27 | - run: pnpm install --frozen-lockfile && pnpm --filter ./packages/admin run build 28 | 29 | - name: 'publish @waline/admin' 30 | uses: JS-DevTools/npm-publish@v3 31 | with: 32 | token: ${{ secrets.NPM_TOKEN }} 33 | package: ./packages/admin 34 | -------------------------------------------------------------------------------- /.github/workflows/release-api.yml: -------------------------------------------------------------------------------- 1 | name: 'publish @waline/api' 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | paths: 8 | - .github/workflows/release-api.yml 9 | - packages/api/** 10 | 11 | permissions: 12 | contents: write 13 | id-token: write 14 | 15 | jobs: 16 | publish: 17 | runs-on: ubuntu-latest 18 | steps: 19 | - name: Checkout 20 | uses: actions/checkout@v4 21 | with: 22 | fetch-depth: 0 23 | 24 | - name: Install pnpm 25 | uses: pnpm/action-setup@v4 26 | 27 | - name: Install Node.js 28 | uses: actions/setup-node@v4 29 | with: 30 | node-version: 20 31 | cache: pnpm 32 | 33 | - name: Install Dependencies 34 | run: pnpm install --frozen-lockfile 35 | 36 | - name: Build API 37 | run: pnpm api:build 38 | 39 | - name: Publish NPM 40 | uses: JS-DevTools/npm-publish@v3 41 | with: 42 | token: ${{ secrets.NPM_TOKEN }} 43 | package: ./packages/api 44 | -------------------------------------------------------------------------------- /.github/workflows/release-client.yml: -------------------------------------------------------------------------------- 1 | name: 'publish @waline/client' 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | paths: 8 | - .github/workflows/release-client.yml 9 | - packages/client/** 10 | 11 | permissions: 12 | contents: write 13 | id-token: write 14 | 15 | jobs: 16 | publish: 17 | runs-on: ubuntu-latest 18 | steps: 19 | - name: Checkout 20 | uses: actions/checkout@v4 21 | with: 22 | fetch-depth: 0 23 | 24 | - name: Install pnpm 25 | uses: pnpm/action-setup@v4 26 | 27 | - name: Install Node.js 28 | uses: actions/setup-node@v4 29 | with: 30 | node-version: 20 31 | cache: pnpm 32 | 33 | - name: Install Dependencies 34 | run: pnpm install --frozen-lockfile 35 | 36 | - name: Build API 37 | run: pnpm api:build 38 | 39 | - name: Build Client 40 | run: pnpm client:build 41 | 42 | - name: WorkSpace DepCheck 43 | run: node scripts/workspace-publish.js @waline/client 44 | 45 | - name: Publish NPM 46 | uses: JS-DevTools/npm-publish@v3 47 | with: 48 | token: ${{ secrets.NPM_TOKEN }} 49 | package: ./packages/client 50 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: Test 2 | 3 | on: 4 | - push 5 | - pull_request 6 | 7 | jobs: 8 | test: 9 | strategy: 10 | matrix: 11 | node-version: 12 | - 20 13 | - 22 14 | os: 15 | - ubuntu-latest 16 | 17 | runs-on: ${{ matrix.os }} 18 | 19 | steps: 20 | - name: Checkout 21 | uses: actions/checkout@v4 22 | 23 | - name: Install pnpm 24 | uses: pnpm/action-setup@v4 25 | 26 | - name: Use Node.js ${{ matrix.node-version }} 27 | uses: actions/setup-node@v4 28 | with: 29 | node-version: ${{ matrix.node-version }} 30 | cache: pnpm 31 | 32 | - name: Install Dependencies 33 | run: pnpm install --frozen-lockfile 34 | 35 | - name: Package Build Test 36 | run: pnpm build 37 | 38 | - name: Linter test 39 | run: pnpm lint 40 | 41 | - name: Unit test 42 | run: pnpm test 43 | 44 | - name: Docs Build Test 45 | run: pnpm docs:build 46 | -------------------------------------------------------------------------------- /.github/workflows/translator.yml: -------------------------------------------------------------------------------- 1 | name: 'issue and discussion translator' 2 | on: 3 | issues: 4 | types: [opened, edited] 5 | issue_comment: 6 | types: [created, edited] 7 | discussion: 8 | types: [created, edited] 9 | discussion_comment: 10 | types: [created, edited] 11 | pull_request_target: 12 | types: [opened, edited] 13 | pull_request_review_comment: 14 | types: [created, edited] 15 | 16 | jobs: 17 | translate: 18 | permissions: 19 | issues: write 20 | discussions: write 21 | pull-requests: write 22 | runs-on: ubuntu-latest 23 | steps: 24 | - uses: actions/checkout@v4 25 | - uses: lizheming/github-translate-action@main 26 | env: 27 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 28 | with: 29 | IS_MODIFY_TITLE: true 30 | APPEND_TRANSLATION: true 31 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # dependencies 2 | node_modules/ 3 | .pnp 4 | .pnp.js 5 | 6 | # Logs 7 | npm-debug.log* 8 | yarn-debug.log* 9 | yarn-error.log* 10 | 11 | # lock files 12 | package-lock.json 13 | yarn.lock 14 | 15 | # testing 16 | coverage/ 17 | 18 | # production 19 | dist/ 20 | 21 | # misc 22 | .DS_Store 23 | .env 24 | .env.local 25 | .env.development.local 26 | .env.test.local 27 | .env.production.local 28 | 29 | # VuePress Temp 30 | **/.vuepress/.cache/ 31 | **/.vuepress/.temp/ 32 | 33 | # editors 34 | .idea/ 35 | 36 | # npm config file 37 | .npmrc 38 | -------------------------------------------------------------------------------- /.husky/commit-msg: -------------------------------------------------------------------------------- 1 | pnpm commitlint --edit $1 2 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | pnpm nano-staged 2 | -------------------------------------------------------------------------------- /.markdownlint-cli2.mjs: -------------------------------------------------------------------------------- 1 | export default { 2 | config: { 3 | default: true, 4 | MD003: { 5 | style: 'atx', 6 | }, 7 | MD004: { 8 | style: 'dash', 9 | }, 10 | MD013: false, 11 | MD024: { 12 | siblings_only: true, 13 | }, 14 | MD033: { 15 | allowed_elements: [ 16 | 'br', 17 | 'kbd', 18 | 'script', 19 | 'span', 20 | 'BiliBili', 21 | 'Catalog', 22 | 'MigrationTool', 23 | 'VidStack', 24 | ], 25 | }, 26 | MD035: { 27 | style: '---', 28 | }, 29 | MD040: false, 30 | MD046: false, 31 | }, 32 | ignores: ['**/node_modules/**', '**/__tests__/**', 'CHANGELOG.md', 'LICENSE'], 33 | }; 34 | -------------------------------------------------------------------------------- /.markdownlintignore: -------------------------------------------------------------------------------- 1 | **/node_modules/** 2 | **/__tests__/** 3 | 4 | CHANGELOG.md 5 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | # coverage 2 | coverage/ 3 | 4 | # output files 5 | dist/ 6 | 7 | # temp files 8 | .temp/ 9 | .cache/ 10 | 11 | # ignore yaml 12 | pnpm-lock.yaml 13 | -------------------------------------------------------------------------------- /.stylelintrc.yml: -------------------------------------------------------------------------------- 1 | extends: 2 | - stylelint-config-hope 3 | rules: 4 | declaration-block-no-redundant-longhand-properties: 5 | - true 6 | - ignoreShorthands: 7 | - /inset/ 8 | media-feature-range-notation: prefix 9 | no-descending-specificity: null 10 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "cSpell.words": [ 3 | "akismet", 4 | "aliyun", 5 | "cloudbase", 6 | "darkmode", 7 | "docsify", 8 | "fancybox", 9 | "jsdelivr", 10 | "katex", 11 | "lizheming", 12 | "pageview", 13 | "pageviews", 14 | "serverurl", 15 | "tencloud", 16 | "tidb", 17 | "unsticky", 18 | "vuepress", 19 | "waline", 20 | "walinejs", 21 | "wechat", 22 | "weibo" 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/assets/logo.png -------------------------------------------------------------------------------- /assets/logo.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/assets/logo.webp -------------------------------------------------------------------------------- /assets/qqgroup.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/assets/qqgroup.jpg -------------------------------------------------------------------------------- /assets/waline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/assets/waline.png -------------------------------------------------------------------------------- /assets/waline.sqlite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/assets/waline.sqlite -------------------------------------------------------------------------------- /commitlint.config.ts: -------------------------------------------------------------------------------- 1 | import { readdirSync } from 'node:fs'; 2 | import { dirname, join } from 'node:path'; 3 | import { fileURLToPath } from 'node:url'; 4 | 5 | const packages = readdirSync( 6 | join(dirname(fileURLToPath(import.meta.url)), './packages/'), 7 | ); 8 | 9 | export default { 10 | extends: ['@commitlint/config-conventional'], 11 | rules: { 12 | 'scope-enum': [2, 'always', ['example', 'release', ...packages]], 13 | }, 14 | }; 15 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | # Waline Docs 2 | 3 | This folder holds docs of waline, which is deployed at . 4 | -------------------------------------------------------------------------------- /docs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "docs", 3 | "version": "1.0.0", 4 | "private": true, 5 | "type": "module", 6 | "scripts": { 7 | "build": "vuepress build src", 8 | "dev": "vuepress dev src" 9 | }, 10 | "devDependencies": { 11 | "@fancyapps/ui": "5.0.36", 12 | "@vuepress/bundler-vite": "2.0.0-rc.23", 13 | "@vuepress/helper": "2.0.0-rc.104", 14 | "@vuepress/plugin-comment": "2.0.0-rc.104", 15 | "@vuepress/plugin-docsearch": "2.0.0-rc.104", 16 | "@waline/client": "workspace:*", 17 | "marked": "15.0.12", 18 | "mathjax-full": "3.2.2", 19 | "sass-embedded": "1.89.0", 20 | "vidstack": "1.12.13", 21 | "vue": "3.5.14", 22 | "vuepress": "2.0.0-rc.23", 23 | "vuepress-shared": "2.0.0-rc.88", 24 | "vuepress-theme-hope": "2.0.0-rc.88" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /docs/src/.vuepress/components/WalineTips.scss: -------------------------------------------------------------------------------- 1 | @use 'vuepress-theme-hope/styles/wrapper'; 2 | 3 | .waline-tips-wrapper { 4 | @include wrapper.horizontal-wrapper(); 5 | 6 | @media print { 7 | display: none; 8 | } 9 | } 10 | 11 | .waline-tips { 12 | margin: 1rem auto; 13 | padding: 10px; 14 | border-radius: 8px; 15 | background: var(--warning-c-soft); 16 | color: var(--warning-c-text); 17 | } 18 | -------------------------------------------------------------------------------- /docs/src/.vuepress/components/WalineTips.ts: -------------------------------------------------------------------------------- 1 | import type { VNode } from 'vue'; 2 | import { computed, defineComponent, h } from 'vue'; 3 | import { usePageFrontmatter, useRouteLocale } from 'vuepress/client'; 4 | import type { 5 | ThemeNormalPageFrontmatter, 6 | ThemeProjectHomePageFrontmatter, 7 | } from 'vuepress-theme-hope'; 8 | 9 | import './WalineTips.scss'; 10 | 11 | const i18n: Record = { 12 | '/': '友情提示:评论区仅作评论展示,如有问题咨询请去 Github Discussion 中提问。', 13 | '/en/': 14 | 'TIPS: The comment area is only for demo. If you have any questions, please go to Github Discussion to ask.', 15 | }; 16 | 17 | export default defineComponent({ 18 | name: 'WalineTips', 19 | 20 | setup() { 21 | const frontmatter = usePageFrontmatter< 22 | ThemeProjectHomePageFrontmatter | ThemeNormalPageFrontmatter 23 | >(); 24 | const routeLocale = useRouteLocale(); 25 | 26 | const isHome = computed(() => frontmatter.value.home ?? false); 27 | const text = computed(() => i18n[routeLocale.value]); 28 | 29 | return (): VNode => 30 | h( 31 | 'div', 32 | { class: ['waline-tips-wrapper', { home: isHome.value }] }, 33 | h('div', { 34 | class: 'waline-tips', 35 | innerHTML: text.value, 36 | }), 37 | ); 38 | }, 39 | }); 40 | -------------------------------------------------------------------------------- /docs/src/.vuepress/config.ts: -------------------------------------------------------------------------------- 1 | import { viteBundler } from '@vuepress/bundler-vite'; 2 | import { defineUserConfig } from 'vuepress'; 3 | import { path } from 'vuepress/utils'; 4 | 5 | import theme from './theme.js'; 6 | 7 | export default defineUserConfig({ 8 | locales: { 9 | '/': { 10 | lang: 'zh-CN', 11 | title: 'Waline', 12 | description: '一款简洁、安全的评论系统。', 13 | }, 14 | '/en/': { 15 | lang: 'en-US', 16 | title: 'Waline', 17 | description: 'A Simple, Safe Comment System.', 18 | }, 19 | }, 20 | 21 | bundler: viteBundler({ 22 | viteOptions: { 23 | ssr: { 24 | noExternal: ['@fancyapps/ui'], 25 | }, 26 | }, 27 | }), 28 | 29 | markdown: { 30 | importCode: { 31 | handleImportPath: (str) => 32 | str === '@waline/api/types' 33 | ? path.resolve(__dirname, '../../../packages/api/dist/api.d.ts') 34 | : str, 35 | }, 36 | }, 37 | 38 | theme, 39 | 40 | alias: { 41 | '@MigrationTool': path.resolve(__dirname, './components/MigrationTool.vue'), 42 | }, 43 | }); 44 | -------------------------------------------------------------------------------- /docs/src/.vuepress/public/assets/icon/apple-icon-152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/.vuepress/public/assets/icon/apple-icon-152.png -------------------------------------------------------------------------------- /docs/src/.vuepress/public/assets/icon/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/.vuepress/public/assets/icon/apple-touch-icon.png -------------------------------------------------------------------------------- /docs/src/.vuepress/public/assets/icon/chrome-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/.vuepress/public/assets/icon/chrome-192.png -------------------------------------------------------------------------------- /docs/src/.vuepress/public/assets/icon/chrome-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/.vuepress/public/assets/icon/chrome-512.png -------------------------------------------------------------------------------- /docs/src/.vuepress/public/assets/icon/chrome-mask-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/.vuepress/public/assets/icon/chrome-mask-192.png -------------------------------------------------------------------------------- /docs/src/.vuepress/public/assets/icon/chrome-mask-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/.vuepress/public/assets/icon/chrome-mask-512.png -------------------------------------------------------------------------------- /docs/src/.vuepress/public/assets/icon/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/.vuepress/public/assets/icon/favicon-16x16.png -------------------------------------------------------------------------------- /docs/src/.vuepress/public/assets/icon/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/.vuepress/public/assets/icon/favicon-32x32.png -------------------------------------------------------------------------------- /docs/src/.vuepress/public/assets/icon/guide-maskable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/.vuepress/public/assets/icon/guide-maskable.png -------------------------------------------------------------------------------- /docs/src/.vuepress/public/assets/icon/guide-monochrome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/.vuepress/public/assets/icon/guide-monochrome.png -------------------------------------------------------------------------------- /docs/src/.vuepress/public/assets/icon/ms-icon-144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/.vuepress/public/assets/icon/ms-icon-144.png -------------------------------------------------------------------------------- /docs/src/.vuepress/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/.vuepress/public/favicon.ico -------------------------------------------------------------------------------- /docs/src/.vuepress/public/google8b3d888472d9b77d.html: -------------------------------------------------------------------------------- 1 | google-site-verification: google8b3d888472d9b77d.html 2 | -------------------------------------------------------------------------------- /docs/src/.vuepress/public/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/.vuepress/public/logo.png -------------------------------------------------------------------------------- /docs/src/.vuepress/public/logo.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/.vuepress/public/logo.webp -------------------------------------------------------------------------------- /docs/src/.vuepress/public/manifest.webmanifest: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Waline", 3 | "short_name": "Waline", 4 | "description": "A simple comment system with backend support", 5 | "icons": [ 6 | { 7 | "src": "/assets/icon/android-chrome-192x192.png", 8 | "sizes": "192x192", 9 | "type": "image/png" 10 | }, 11 | { 12 | "src": "/assets/icon/android-chrome-512x512.png", 13 | "sizes": "512x512", 14 | "type": "image/png" 15 | } 16 | ], 17 | "theme_color": "#0066AE", 18 | "background_color": "#ffffff", 19 | "display": "standalone" 20 | } 21 | -------------------------------------------------------------------------------- /docs/src/.vuepress/shims-fancy-box.d.ts: -------------------------------------------------------------------------------- 1 | declare module '@fancyapps/ui/dist/fancybox/fancybox.esm.js' { 2 | export * from '@fancyapps/ui'; 3 | } 4 | -------------------------------------------------------------------------------- /docs/src/.vuepress/shims-vue.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.vue' { 2 | import type { DefineComponent } from 'vue'; 3 | 4 | const component: DefineComponent; 5 | export default component; 6 | } 7 | -------------------------------------------------------------------------------- /docs/src/.vuepress/styles/config.scss: -------------------------------------------------------------------------------- 1 | $theme-color: #4e9def; 2 | -------------------------------------------------------------------------------- /docs/src/.vuepress/styles/index.scss: -------------------------------------------------------------------------------- 1 | @use 'fancybox'; 2 | 3 | .waline-wrapper { 4 | // fancybox 5 | img { 6 | cursor: zoom-in; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /docs/src/.vuepress/utils/exportRaw.ts: -------------------------------------------------------------------------------- 1 | export const exportRaw = (name: string, data: BlobPart): void => { 2 | const saveAnchor = document.createElementNS( 3 | 'http://www.w3.org/1999/xhtml', 4 | 'a', 5 | ) as HTMLAnchorElement; 6 | 7 | saveAnchor.href = window.URL.createObjectURL(new Blob([data])); 8 | saveAnchor.download = name; 9 | 10 | const event = new MouseEvent('click', { 11 | relatedTarget: window, 12 | }); 13 | 14 | saveAnchor.dispatchEvent(event); 15 | }; 16 | -------------------------------------------------------------------------------- /docs/src/.vuepress/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from './exportRaw.js'; 2 | export * from './transform/index.js'; 3 | -------------------------------------------------------------------------------- /docs/src/.vuepress/utils/transform/lc2tcb.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * leancloud 数据结构转 cloudbase 3 | */ 4 | export const lc2tcb = (json) => 5 | json.results 6 | .map((comment) => { 7 | if (comment.hasOwnProperty('objectId')) { 8 | comment._id = comment.objectId; 9 | delete comment.objectId; 10 | } else if (typeof comment._id !== 'string' && comment._id.$oid) { 11 | comment._id = comment._id.$oid; 12 | } 13 | 14 | if (typeof comment.insertedAt === 'object' && comment.insertedAt.iso) { 15 | comment.insertedAt = { $date: comment.insertedAt.iso }; 16 | } 17 | 18 | delete comment.ACL; 19 | 20 | return JSON.stringify(comment); 21 | }) 22 | .join('\r\n'); 23 | -------------------------------------------------------------------------------- /docs/src/.vuepress/utils/transform/tk2lc.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * twikoo 数据结构转 leancloud 3 | */ 4 | export const tk2lc = (input: string) => { 5 | let arr: any[]; 6 | try { 7 | arr = JSON.parse(input); 8 | } catch (e) { 9 | // compat old twikoo output json format 10 | arr = input 11 | .trim() 12 | .split(/[\r\n]+/) 13 | .filter((v) => v) 14 | .map((text) => JSON.parse(text)); 15 | } 16 | 17 | const data = arr.map( 18 | ({ 19 | _id, 20 | comment, 21 | created, 22 | updated, 23 | ip, 24 | link, 25 | mail, 26 | nick, 27 | ua, 28 | url, 29 | pid, 30 | rid, 31 | isSpam, 32 | }) => ({ 33 | objectId: typeof _id === 'string' ? _id : _id.$oid, 34 | comment: comment, 35 | insertedAt: { 36 | __type: 'Date', 37 | iso: new Date( 38 | created?.$numberLong ? Number(created.$numberLong) : created, 39 | ).toISOString(), 40 | }, 41 | createdAt: new Date( 42 | created?.$numberLong ? Number(created.$numberLong) : created, 43 | ).toISOString(), 44 | updatedAt: new Date( 45 | updated?.$numberLong ? Number(updated.$numberLong) : updated, 46 | ).toISOString(), 47 | ip, 48 | link, 49 | mail, 50 | nick, 51 | ua, 52 | url, 53 | pid, 54 | rid, 55 | status: isSpam ? 'spam' : 'approved', 56 | }), 57 | ); 58 | 59 | return { 60 | results: data, 61 | }; 62 | }; 63 | -------------------------------------------------------------------------------- /docs/src/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | home: true 3 | title: Waline 4 | icon: home 5 | heroText: Waline 6 | heroImage: /logo.png 7 | actions: 8 | - text: 💡 快速上手 9 | link: /guide/get-started/ 10 | type: primary 11 | 12 | - text: ℹ️ 介绍 13 | link: /advanced/intro.html 14 | type: secondary 15 | 16 | features: 17 | - title: 轻量 18 | icon: light 19 | details: 53kb gzip 的完整客户端大小 20 | 21 | - title: 完全免费部署 22 | icon: free 23 | details: 可免费部署在 Vercel 上 24 | 25 | - title: 易于部署 26 | icon: strong 27 | details: 多种部署部署方式和存储服务支持 28 | 29 | - title: 登录支持 30 | icon: register 31 | details: 在允许匿名评论的基础上,支持账号注册,保持身份 32 | 33 | - title: 自由评论 34 | icon: markdown 35 | details: 完全的 Markdown 支持,同时包含表情、数学公式、HTML 嵌入 36 | link: /guide/features/syntax.html 37 | 38 | - title: 强大的安全性 39 | icon: safe 40 | details: 内容校验、防灌水、保护敏感数据等 41 | link: /guide/features/safety.html 42 | 43 | - title: 文章反应 44 | icon: reaction 45 | details: 快速表达你对文章的态度 46 | link: /guide/features/reaction.html 47 | 48 | - title: 浏览量统计 49 | icon: counter 50 | details: 通过 <1kb 代码可靠统计文章浏览量 51 | link: /guide/features/pageview.html 52 | 53 | footer: GPL-2.0 协议 | Copyright © 2020-present lizheming | 主题使用 VuePress Theme Hope 54 | --- 55 | -------------------------------------------------------------------------------- /docs/src/advanced/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 高级 3 | icon: advanced 4 | index: false 5 | --- 6 | 7 | 8 | -------------------------------------------------------------------------------- /docs/src/advanced/assets/cloudbase-update.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/advanced/assets/cloudbase-update.jpg -------------------------------------------------------------------------------- /docs/src/advanced/assets/vercel-update.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/advanced/assets/vercel-update.png -------------------------------------------------------------------------------- /docs/src/advanced/contribution.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 贡献指南 3 | icon: contribute 4 | order: -1 5 | --- 6 | 7 | 欢迎大家为 waline 提交 Pull Request!:tada: 8 | 9 | 如果你想为 waline 贡献出自己的一份力量,以下是一份指南。 10 | 11 | 12 | 13 | ## 准备 14 | 15 | 1. 使用 Git 克隆项目 16 | 17 | ```bash 18 | git clone https://github.com/walinejs/waline.git 19 | ``` 20 | 21 | 1. 安装依赖 22 | 23 | ::: warning 24 | 25 | 请使用 pnpm 安装依赖: 26 | 27 | ```bash 28 | npm i -g pnpm@latest 29 | ``` 30 | 31 | ::: 32 | 33 | ```bash 34 | cd waline 35 | pnpm i 36 | ``` 37 | 38 | ## 开发 39 | 40 | - 使用 `pnpm client:dev` 启动 `@waline/client` 本地开发 41 | 42 | ::: tip 43 | 44 | 由于 waline 是 Client/Server 架构,在调试 client 时,你需要设置 `SERVERURL` 为调试服务器,或同时启动下面的 server 开发服务器并使用默认的 `localhost:9090`。 45 | 46 | ::: 47 | 48 | - 使用 `pnpm server:dev` 启动 `@waline/server` 本地开发 49 | 50 | ::: tip 51 | 52 | 为了使 `@waline/server` 能在本地正常运行,你需要配置必要的本地环境变量至 `.env`。 53 | 54 | 在 `.env.example` 我们准备了示例供你参考 55 | 56 | ::: 57 | -------------------------------------------------------------------------------- /docs/src/advanced/faq.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: FAQ 3 | icon: faq 4 | order: 4 5 | --- 6 | 7 | Waline 诞生之初就已经作了很明确的定位: 8 | 9 | ::: info 一款带后端的极简风评论系统。 10 | 11 | ::: 12 | 13 | 之后发布的所有版本都是围绕这个定位的修改。 14 | 15 | ## 和 Valine 是什么关系? 16 | 17 | ::: info Waline = With backend Valine 18 | 19 | ::: 20 | 21 | ## 是否需要在 LeanCloud 上部署 Valine-Admin? 22 | 23 | 不需要。Waline 是数据存储,服务端以及客户端三位一体的部署,其中服务端相当于 Valine 的 LeanCloud 云引擎。服务端包含了 Valine 所用云引擎提供的评论管理和邮件通知等相关的功能,不依赖额外的 LeanCloud 云引擎,所以不会受到 LeanCloud 云引擎休眠策略的限制。 24 | 25 | ## 如何升级? 26 | 27 | Waline 主要由前端和服务端两部分组成。 28 | 29 | ### 前端 30 | 31 | 前端通过在网页引入 JS 脚本来插入评论列表和评论框。大部分场景下,链接会使用线上 CDN 最新版的地址,会自动应用最新版本,无需使用者手动更新。 32 | 33 | ::: note 以下情形需要手动更新 34 | 35 | 1. CDN 地址中强制指定了版本号,这时候需要手动修改版本号为最新。 36 | 1. 使用了 NPM 引入最终将模块打包到了代码中,这时候需要修改依赖中的版本号保证依赖在安装的时候能获取到最新版本。 37 | 38 | ::: 39 | 40 | ### 服务端 41 | 42 | 服务端指的是在前端脚本中配置的 `serverURL` 对应的后端服务,其更新视不同的部署环境会略有区别。服务端的更新会比较频繁。 43 | 44 | #### Vercel 45 | 46 | 进入到对应的 GitHub 仓库中,修改 package.json 文件中的 `@waline/vercel` 版本号为最新版本即可。 47 | 48 | ![vercel](./assets/vercel-update.png) 49 | 50 | #### CloudBase 51 | 52 | 进入代码编辑界面,点击 保存并重新安装依赖 即可。如果还不行,则进入 我的应用 选择 部署 进行重新部署。 53 | 54 | ::: caution 55 | 56 | 重新部署会清空之前的文件,如果之前文件中有配置的话需要先行备份。 57 | 58 | ::: 59 | 60 | ![cloudBase](./assets/cloudbase-update.jpg) 61 | 62 | #### Docker 63 | 64 | 直接运行 `docker pull lizheming/waline` 拉取最新的镜像即可。 65 | 66 | ## 发布评论很慢怎么办? 67 | 68 | 因为一些技术性原因,在发布评论的时垃圾邮件检测、评论通知都是串联操作。其中垃圾邮件检测使用的是国外 Akismet 提供的服务,可能访问很慢,用户可以通过 `AKISMET_KEY=false` 环境变量关闭垃圾评论检测功能。除了垃圾评论检测服务,评论通知中的邮件通知也有可能造成超时,可以通过关闭评论通知测试是否是该功能导致的。 69 | -------------------------------------------------------------------------------- /docs/src/advanced/privacy.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 隐私协议 3 | icon: privacy 4 | order: -2 5 | --- 6 | 7 | 感谢您使用 Waline 评论系统,我们非常重视您的隐私权和数据安全。本隐私协议将告知您我们如何收集、使用、处理和保护您的个人数据。 8 | 9 | ## 数据类型 10 | 11 | 为了提供服务,我们会收集和存储您的 IP 地址、浏览器 User-Agent (UA) 等相关信息,这些信息是必要的并且无法避免。默认我们不会使用任何和 Cookie 相关的功能。 12 | 13 | ## 数据用途 14 | 15 | 我们仅会使用您的信息来提供评论服务,并且不会泄露、出售或租赁给第三方。我们会尽最大努力保护您的信息安全,并遵守当地法律法规和相关标准。 16 | 17 | ## 数据处理 18 | 19 | 为了向您提供更好的服务,我们可能将您的信息传输到我们的服务器、合作伙伴的服务器或第三方服务商的服务器,这些服务器有可能位于境内或境外。我们会采取合理的措施保护您的信息安全,并遵守当地法律法规和相关标准。 20 | 21 | ## 数据保护 22 | 23 | 我们会采取技术措施和管理措施来保护您的信息安全,防止未经授权的访问、使用或泄露。如果发生了数据安全问题,我们会及时通知您并采取措施进行修复。但请注意,因互联网本身的特性和技术限制,我们无法保证您的信息 100% 安全。 24 | 25 | ## 法律责任 26 | 27 | 我们将遵守当地法律、法规和相关标准,保护用户的隐私权和数据安全。如果有必要,我们可能会根据法律要求提供用户的信息。除此之外,我们不会主动泄露用户信息。 28 | 29 | ## 其他条款 30 | 31 | 本隐私协议适用于 Waline 评论系统的默认配置下所有产品和服务。对于部分网站基于 Waline 改造后增加的额外功能,本隐私协议不保证适用。我们保留对隐私协议的修改权利,并会及时更新隐私协议。如果您对本隐私协议有任何疑问或建议,请联系我们。 32 | -------------------------------------------------------------------------------- /docs/src/assets/aliyun-computenest-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/aliyun-computenest-1.png -------------------------------------------------------------------------------- /docs/src/assets/aliyun-computenest-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/aliyun-computenest-2.png -------------------------------------------------------------------------------- /docs/src/assets/aliyun-computenest-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/aliyun-computenest-3.png -------------------------------------------------------------------------------- /docs/src/assets/aliyun-computenest-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/aliyun-computenest-4.png -------------------------------------------------------------------------------- /docs/src/assets/aliyun-computenest-en-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/aliyun-computenest-en-1.png -------------------------------------------------------------------------------- /docs/src/assets/aliyun-computenest-en-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/aliyun-computenest-en-2.png -------------------------------------------------------------------------------- /docs/src/assets/aliyun-computenest-en-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/aliyun-computenest-en-3.png -------------------------------------------------------------------------------- /docs/src/assets/aliyun-computenest-en-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/aliyun-computenest-en-4.png -------------------------------------------------------------------------------- /docs/src/assets/aliyun-fc-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/aliyun-fc-1.jpg -------------------------------------------------------------------------------- /docs/src/assets/aliyun-fc-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/aliyun-fc-2.jpg -------------------------------------------------------------------------------- /docs/src/assets/aliyun-fc-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/aliyun-fc-3.jpg -------------------------------------------------------------------------------- /docs/src/assets/aliyun-fc-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/aliyun-fc-4.jpg -------------------------------------------------------------------------------- /docs/src/assets/aliyun-fc-5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/aliyun-fc-5.jpg -------------------------------------------------------------------------------- /docs/src/assets/aliyun-fc-6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/aliyun-fc-6.jpg -------------------------------------------------------------------------------- /docs/src/assets/aliyun-fc-7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/aliyun-fc-7.jpg -------------------------------------------------------------------------------- /docs/src/assets/aliyun-fc-8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/aliyun-fc-8.jpg -------------------------------------------------------------------------------- /docs/src/assets/baidu-cfc-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/baidu-cfc-1.jpg -------------------------------------------------------------------------------- /docs/src/assets/baidu-cfc-10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/baidu-cfc-10.jpg -------------------------------------------------------------------------------- /docs/src/assets/baidu-cfc-11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/baidu-cfc-11.jpg -------------------------------------------------------------------------------- /docs/src/assets/baidu-cfc-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/baidu-cfc-2.jpg -------------------------------------------------------------------------------- /docs/src/assets/baidu-cfc-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/baidu-cfc-3.jpg -------------------------------------------------------------------------------- /docs/src/assets/baidu-cfc-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/baidu-cfc-4.jpg -------------------------------------------------------------------------------- /docs/src/assets/baidu-cfc-5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/baidu-cfc-5.jpg -------------------------------------------------------------------------------- /docs/src/assets/baidu-cfc-6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/baidu-cfc-6.jpg -------------------------------------------------------------------------------- /docs/src/assets/baidu-cfc-7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/baidu-cfc-7.jpg -------------------------------------------------------------------------------- /docs/src/assets/baidu-cfc-8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/baidu-cfc-8.jpg -------------------------------------------------------------------------------- /docs/src/assets/baidu-cfc-9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/baidu-cfc-9.jpg -------------------------------------------------------------------------------- /docs/src/assets/netlify-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/netlify-1.png -------------------------------------------------------------------------------- /docs/src/assets/netlify-10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/netlify-10.png -------------------------------------------------------------------------------- /docs/src/assets/netlify-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/netlify-2.png -------------------------------------------------------------------------------- /docs/src/assets/netlify-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/netlify-3.png -------------------------------------------------------------------------------- /docs/src/assets/netlify-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/netlify-4.png -------------------------------------------------------------------------------- /docs/src/assets/netlify-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/netlify-5.png -------------------------------------------------------------------------------- /docs/src/assets/netlify-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/netlify-6.png -------------------------------------------------------------------------------- /docs/src/assets/netlify-8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/netlify-8.png -------------------------------------------------------------------------------- /docs/src/assets/netlify-9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/netlify-9.png -------------------------------------------------------------------------------- /docs/src/assets/railway-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/railway-1.jpg -------------------------------------------------------------------------------- /docs/src/assets/railway-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/railway-2.jpg -------------------------------------------------------------------------------- /docs/src/assets/railway-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/railway-3.jpg -------------------------------------------------------------------------------- /docs/src/assets/railway-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/railway-4.jpg -------------------------------------------------------------------------------- /docs/src/assets/tidb-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/tidb-1.png -------------------------------------------------------------------------------- /docs/src/assets/tidb-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/tidb-2.png -------------------------------------------------------------------------------- /docs/src/assets/tidb-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/tidb-3.png -------------------------------------------------------------------------------- /docs/src/assets/tidb-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/tidb-4.png -------------------------------------------------------------------------------- /docs/src/assets/tidb-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/tidb-5.png -------------------------------------------------------------------------------- /docs/src/assets/tidb-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/tidb-6.png -------------------------------------------------------------------------------- /docs/src/assets/tidb-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/tidb-7.png -------------------------------------------------------------------------------- /docs/src/assets/vercel-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/vercel-1.png -------------------------------------------------------------------------------- /docs/src/assets/vercel-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/vercel-2.png -------------------------------------------------------------------------------- /docs/src/assets/vercel-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/vercel-3.png -------------------------------------------------------------------------------- /docs/src/assets/vercel-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/vercel-4.png -------------------------------------------------------------------------------- /docs/src/assets/vercel-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/vercel-5.png -------------------------------------------------------------------------------- /docs/src/assets/vercel-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/vercel-6.png -------------------------------------------------------------------------------- /docs/src/assets/vercel-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/vercel-7.png -------------------------------------------------------------------------------- /docs/src/assets/vercel-8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/vercel-8.png -------------------------------------------------------------------------------- /docs/src/assets/vercel-9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/vercel-9.png -------------------------------------------------------------------------------- /docs/src/assets/zeabur-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/zeabur-1.png -------------------------------------------------------------------------------- /docs/src/assets/zeabur-10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/zeabur-10.png -------------------------------------------------------------------------------- /docs/src/assets/zeabur-11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/zeabur-11.png -------------------------------------------------------------------------------- /docs/src/assets/zeabur-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/zeabur-2.png -------------------------------------------------------------------------------- /docs/src/assets/zeabur-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/zeabur-3.png -------------------------------------------------------------------------------- /docs/src/assets/zeabur-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/zeabur-4.png -------------------------------------------------------------------------------- /docs/src/assets/zeabur-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/zeabur-5.png -------------------------------------------------------------------------------- /docs/src/assets/zeabur-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/zeabur-6.png -------------------------------------------------------------------------------- /docs/src/assets/zeabur-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/zeabur-7.png -------------------------------------------------------------------------------- /docs/src/assets/zeabur-8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/zeabur-8.png -------------------------------------------------------------------------------- /docs/src/assets/zeabur-9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/assets/zeabur-9.png -------------------------------------------------------------------------------- /docs/src/cookbook/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Cookbook 3 | icon: cookbook 4 | --- 5 | 6 | 此 Cookbook 将更加深入的对 Waline 进行介绍。 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/src/cookbook/customize/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 自定义 3 | icon: customize 4 | dir: 5 | collapsible: false 6 | order: 3 7 | index: false 8 | --- 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/src/cookbook/customize/upload-image.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 上传图片 3 | icon: pic 4 | --- 5 | 6 | 本教程指引你如何设置自己的图床服务,以便在评论中上传图片。 7 | 8 | 9 | 10 | `@waline/client` 提供了 `imageUploader` 选项。你应该自行处理客户端传递进来的图片对象,在自行上传图片后,通过 Promise 返回一个图片地址。 11 | 12 | ## 案例 13 | 14 | 一个使用 `lsky - pro` 图床的案例。 15 | 16 | ```html 17 | 18 | 19 | 20 | 21 | 22 | Waline imageUploader 案例 23 | 27 | 28 | 29 |
30 | 56 | 57 | 58 | ``` 59 | -------------------------------------------------------------------------------- /docs/src/cookbook/import/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 导入 Waline 3 | icon: import 4 | dir: 5 | collapsible: false 6 | order: 1 7 | index: false 8 | --- 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/src/cookbook/import/cdn.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 通过 CDN 导入 Waline 3 | icon: import 4 | order: 1 5 | --- 6 | 7 | 本教程引导你如何使用 CDN 导入 Waline。 8 | 9 | 10 | 11 | 对于国内用户,我们推荐使用 [unpkg](https://unpkg.com/@waline/client)。对于国外用户,我们推荐使用 jsDelivr。 12 | 13 | 为了让 Waline SSR 友好,我们在 V2 版本中拆分了 Waline 的样式。这意味着,你需要导入 Waline 的 CSS 样式文件,并导入 Waline 脚本文件并调用 Waline。 14 | 15 | ## 评论功能 16 | 17 | 通常情况下,你希望 Waline 渲染评论列表,你可以按照如下方式引入 Waline: 18 | 19 | ```html 20 | 21 | 25 | 26 | 33 | ``` 34 | 35 | ## 浏览量和评论数 36 | 37 | 有些时候,你可能希望在主页或文章列表显示文章的浏览量和评论数,但是不需要加载评论组件,那么你可以通过下列方式引入一个 Gzip < 1KB 的脚本文件: 38 | 39 | 浏览量: 40 | 41 | ```html 42 | 49 | ``` 50 | 51 | 评论数: 52 | 53 | ```html 54 | 61 | ``` 62 | 63 | ## 更多 64 | 65 | ::: info 指定版本 66 | 67 | 你可能已经注意到,上述案例中,我们都在 `@waline/client` 后显式声明了 `@v2` 版本,这是推荐的,因为这能有效避免日后 Waline 客户端发布 V3 版本后,导致你的网站工作异常。 68 | 69 | ::: 70 | -------------------------------------------------------------------------------- /docs/src/en/advanced/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Advanced 3 | icon: advanced 4 | index: false 5 | --- 6 | 7 | 8 | -------------------------------------------------------------------------------- /docs/src/en/advanced/assets/cloudbase-update.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/en/advanced/assets/cloudbase-update.jpg -------------------------------------------------------------------------------- /docs/src/en/advanced/assets/vercel-update.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/en/advanced/assets/vercel-update.png -------------------------------------------------------------------------------- /docs/src/en/advanced/contribution.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Development Guide 3 | icon: contribute 4 | order: -1 5 | --- 6 | 7 | We welcome everyone to open Pull Requests for waline! :tada: 8 | 9 | If you want to contribute to waline, here is a guide. 10 | 11 | 12 | 13 | ## Preparation 14 | 15 | 1. Use Git to clone the project 16 | 17 | ```bash 18 | git clone https://github.com/walinejs/waline.git 19 | ``` 20 | 21 | 1. Installation dependencies 22 | 23 | ::: warning 24 | 25 | Install and use pnpm to install dependencies. 26 | 27 | ```bash 28 | npm i -g pnpm@latest 29 | ``` 30 | 31 | ::: 32 | 33 | ```bash 34 | cd waline 35 | pnpm i 36 | ``` 37 | 38 | ## Development 39 | 40 | - Run `pnpm client:dev` to start `@waline/client` devServer 41 | 42 | ::: tip 43 | 44 | Since waline is based on Client/Server architecture, when debugging a client, you need to set `SERVERURL`, or start server devServer below at the same time and use the default `localhost:9090`. 45 | 46 | ::: 47 | 48 | - Run `pnpm server:dev` to start `@waline/server` devServer 49 | 50 | ::: tip 51 | 52 | In order to run `@waline/server` locally, you need to configure some local environment variables to `.env`. 53 | 54 | We provide an example for you in `.env.example`. 55 | 56 | ::: 57 | -------------------------------------------------------------------------------- /docs/src/en/cookbook/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Cookbook 3 | icon: cookbook 4 | --- 5 | 6 | This cookbook will introduce Waline in more depth. 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/src/en/cookbook/customize/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Customize 3 | icon: customize 4 | dir: 5 | collapsible: false 6 | order: 3 7 | index: false 8 | --- 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/src/en/cookbook/import/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Import Waline 3 | icon: import 4 | dir: 5 | collapsible: false 6 | order: 1 7 | index: false 8 | --- 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/src/en/guide/deploy/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Deploy 3 | icon: deploy 4 | --- 5 | 6 | Waline supports multiple deployment methods, and use Vercel by default. You can choose from the following deployment platforms or deploy yourself. 7 | 8 | 9 | -------------------------------------------------------------------------------- /docs/src/en/guide/features/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Feature 3 | icon: feature 4 | dir: 5 | order: 2 6 | expanded: true 7 | index: false 8 | --- 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/src/en/guide/features/assets/label-admin.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/en/guide/features/assets/label-admin.jpg -------------------------------------------------------------------------------- /docs/src/en/guide/features/assets/label-profile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/en/guide/features/assets/label-profile.jpg -------------------------------------------------------------------------------- /docs/src/en/guide/features/i18n.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: I18n Support 3 | icon: i18n 4 | order: 6 5 | --- 6 | 7 | Waline has built-in multi-language support, and you can also customize Waline's locale config. 8 | 9 | 10 | 11 | ## Client 12 | 13 | ### Set Language 14 | 15 | You can set the language used by Waline through the `lang` option. The supported languages are: 16 | 17 | - zh 18 | - zh-CN 19 | - zh-TW 20 | - en 21 | - en-US 22 | - jp 23 | - jp-JP 24 | - pt-BR 25 | - ru 26 | - ru-RU 27 | - fr-FR 28 | - fr 29 | - vi 30 | - vi-vn 31 | - es 32 | - es-MX 33 | 34 | E.g.: 35 | 36 | ```js 37 | Waline.init({ 38 | el: '#waline', 39 | // ... 40 | lang: 'en', 41 | }); 42 | ``` 43 | 44 | ::: tip 45 | 46 | If you want to help Waline add more language support, we welcome you to send a PR to [client/config/i18n](https://github.com/walinejs/waline/tree/main/packages/client/src/config/i18n). 47 | 48 | ::: 49 | 50 | ### Customize 51 | 52 | You can customize the language through the `locales` option, or set some fields to overwrite the existing UI text. 53 | 54 | For details, see [Cookbook → Customize Locale](../../cookbook/customize/locale.md). 55 | 56 | ## Server 57 | 58 | The information returned by the server interface will dynamically switch the language based on the lang parameter input by the client. 59 | 60 | ## Customize 61 | 62 | You can customize the content for the corresponding language with the `locales` option, see [Cookbook → Customize Locale](../../cookbook/customize/locale.md) for details. 63 | -------------------------------------------------------------------------------- /docs/src/en/guide/features/label.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: User label 3 | icon: label 4 | order: 5 5 | --- 6 | 7 | Waline allows you to set level labels based on interactions and custom labels for logged-in users. 8 | 9 | ## Grade labels 10 | 11 | You need to configure the `LEVELS` variable on the server to enable this function, see [Server Environment Variable Configuration](../../reference/server/env.md#display). 12 | 13 | You can customize these level labels via the locales option, see [Multilingual](./i18n.md#customize) 14 | 15 | ## Exclusive Label 16 | 17 | You can customize labels for users through the management side. 18 | 19 | ![Admin Label](./assets/label-admin.jpg) 20 | 21 | As a login user, you can also update your exclusive label at profile page. 22 | 23 | ![Profile Label](./assets/label-profile.jpg) 24 | -------------------------------------------------------------------------------- /docs/src/en/guide/features/widget/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Widgets 3 | icon: widget 4 | dir: 5 | index: false 6 | order: -1 7 | --- 8 | 9 | Waline provides some widgets, you can use them through `Waline.`. 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /docs/src/en/guide/get-started/assets/leancloud-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/en/guide/get-started/assets/leancloud-1.png -------------------------------------------------------------------------------- /docs/src/en/guide/get-started/assets/leancloud-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/en/guide/get-started/assets/leancloud-2.png -------------------------------------------------------------------------------- /docs/src/en/migration/tool.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Migration Helper 3 | icon: helper 4 | --- 5 | 6 | 7 | 8 | ::: tip 9 | 10 | After using the above tools to obtain the exported files, you can import them in the correct storage service. 11 | 12 | ::: 13 | 14 | 21 | -------------------------------------------------------------------------------- /docs/src/en/migration/v3.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Migration to @waline/client V3 3 | icon: migration 4 | --- 5 | 6 | ## Support Range Changes 7 | 8 | - Node.js: 9 | 10 | V3 only supports the latest LTS Node version. 11 | 12 | The current LTS versions are Node.js 18 and Node.js 20, which means we have removed support for Node.14 and Node 16. 13 | 14 | - Browser: 15 | 16 | V3 only supports modern browsers, aligning with Vite's [Default Browser Support Range](https://vitejs.dev/guide/build.html#browser-compatibility) 17 | 18 | - Chrome >=87 19 | - Firefox >=78 20 | - Safari >=14 21 | - Edge >=88 22 | 23 | ## Feature Removal 24 | 25 | - Now, when getting path binded to a counter element, `id` is no longer read. you should use `data-path`. 26 | - Legacy packages have been removed. 27 | 28 | ## CSS Variables Update 29 | 30 | `bgcolor` in CSS variables are changed to `bg-color`: 31 | 32 | ```diff 33 | ---waline-bgcolor: #fff; 34 | +--waline-bg-color: #fff; 35 | ---waline-bgcolor-light: #f8f8f8; 36 | +--waline-bg-color-light: #f8f8f8; 37 | ---waline-bgcolor-hover: #f0f0f0; 38 | +--waline-bg-color-hover: #f0f0f0; 39 | ---waline-disable-bgcolor: #f8f8f8; 40 | +--waline-disable-bg-color: #f8f8f8; 41 | ---waline-code-bgcolor: #282c34; 42 | +--waline-code-bg-color: #282c34; 43 | ---waline-info-bgcolor: #f8f8f8; 44 | +--waline-info-bg-color: #f8f8f8; 45 | ``` 46 | -------------------------------------------------------------------------------- /docs/src/en/reference/api/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: API 3 | icon: config 4 | --- 5 | 6 | Waline provides `@waline/api` package for official client, third-party client developers and users to call Waline backend API. 7 | 8 | ## API 9 | 10 | @[code](@waline/api/types) 11 | -------------------------------------------------------------------------------- /docs/src/guide/deploy/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 部署 3 | icon: deploy 4 | dir: 5 | expanded: true 6 | order: 3 7 | --- 8 | 9 | Waline 支持多种部署方式,默认使用 Vercel 作为部署平台,你可以根据自己的需求选择其他部署平台或自行部署。 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/src/guide/deploy/aliyun-computenest.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 阿里云计算巢部署 3 | icon: aliyun 4 | --- 5 | 6 | [阿里云计算巢](https://computenest.console.aliyun.com/) 服务是一个开放给服务商(包括:企业应用服务商、IT集成服务商、交付服务商和管理服务提供商等)和用户的服务管理PaaS平台。计算巢服务为服务商和用户提供了高效、便捷、安全的服务使用体验,服务商能更好地在阿里云上部署、交付和管理服务,用户能集中管理在阿里云上订阅的各类服务商提供的服务。 7 | 8 | 9 | 10 | ## 如何部署 11 | 12 | 1. 部署前确认:部署 Waline 服务实例,需要对部分阿里云资源进行访问和创建操作。因此您的账号需要包含如下资源的权限。 说明:当您的账号是 RAM 账号时,才需要添加此权限。 13 | 14 | | 权限策略名称 | 备注 | 15 | | ------------------------------- | ----------------------------------------- | 16 | | AliyunECSFullAccess | 管理云服务器服务(ECS)的权限 | 17 | | AliyunVPCFullAccess | 管理专有网络(VPC)的权限 | 18 | | AliyunROSFullAccess | 管理资源编排服务(ROS)的权限 | 19 | | AliyunComputeNestUserFullAccess | 管理计算巢服务(ComputeNest)的用户侧权限 | 20 | 21 | 1. 访问计算巢 Waline 服务[部署链接](https://computenest.console.aliyun.com/service/instance/create/default?type=user&ServiceName=Waline社区版),按提示填写部署参数 22 | 1. 根据需要选择付费类型,ECS(即云服务器)实例规格、系统盘类型、实例密码。 23 | ![computenest](../../assets/aliyun-computenest-1.png) 24 | 1. 选择部署 ECS 实例的可用区,并选择 ECS 实例所在的 VPC(即专有网络)和交换机 ID。如果您的账户下没有可用的VPC和交换机,您可在计算巢控制台"新建专有网路"和"新建交换机"直接跳转到相关阿里云产品控制台进行创建。同时点击下一步。 25 | ![computenest](../../assets/aliyun-computenest-2.png) 26 | 1. 确认部署参数并查看预估价格后,点击立即创建。 27 | 1. 点击左侧 TAB "服务实例",进入服务列表页可查看服务实例部署进度。![computenest](../../assets/aliyun-computenest-3.png) 28 | 1. 点击实例 ID 进入到详情界面,点击"体验地址"即可体验Waline服务。![computenest](../../assets/aliyun-computenest-4.png) 29 | -------------------------------------------------------------------------------- /docs/src/guide/deploy/cloudbase.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: CloudBase 云开发部署 3 | icon: tencloud 4 | --- 5 | 6 | Waline 支持一键部署到腾讯云开发上。 7 | 8 | 9 | 10 | ## 如何部署 11 | 12 | [![CloudBase](https://main.qcloudimg.com/raw/67f5a389f1ac6f3b4d04c7256438e44f.svg)](https://console.cloud.tencent.com/tcb/env/index?action=CreateAndDeployCloudBaseProject&appUrl=https%3A%2F%2Fgithub.com%2Fwalinejs%2Ftcb-starter&branch=master&appName=waline) 13 | 14 | 点击上方按钮,跳转至腾讯云开发进行快速部署。 15 | 16 | 登录之后会让你选择部署的位置,你可以选择已有的应用,也可以选择新建应用。 17 | 18 | ![CloudBase-1](https://p0.ssl.qhimg.com/t01399b7d06d0db3ff6.png) 19 | 20 | 点击 下一步: 应用配置 后再点击 完成,就会跳转到应用部署界面自动进行部署。此时会提示你“构建中,预计 3-5 分钟”,稍等片刻,该条目右侧就会出现访问和管理按钮。 21 | 22 | ![CloudBase-2](https://p5.ssl.qhimg.com/t0183246f20ffccfe5e.png) 23 | 24 | 点击 访问 按钮获得最终部署好的网站地址,将其填入前端脚本的 `serverURL` 配置中,即可完成全部配置。 25 | -------------------------------------------------------------------------------- /docs/src/guide/deploy/railway.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Railway 部署 3 | icon: railway 4 | --- 5 | 6 | [Railway](https://railway.app/) 是一个可免费使用的 Serverless 部署平台。我们可以快速的将 Waline 部署到 Railway 平台上。 7 | 8 | 9 | 10 | ## 如何部署 11 | 12 | [![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/new/template/UZB84v?referralCode=lizheming) 13 | 14 | 点击上方按钮,跳转至 Railway 平台快速部署。登录之后会让你选择新建仓库的名称,环境变量部分不需要改动,直接点击下方的 Deploy 按钮进行部署即可。 15 | 16 | ![railway1](../../assets/railway-1.jpg) 17 | 18 | 进入管理界面后,选择 PostgreSQL - Query,将 [waline.pgsql](https://github.com/walinejs/waline/blob/main/assets/waline.pgsql) 中的内容粘贴至输入框中,点击底部的 Run Query 按钮完成数据库的初始化。 19 | 20 | ![railway2](../../assets/railway-2.jpg) 21 | 22 | 最后在 Deployments - Domains 中就可以获取到访问的地址了。 23 | 24 | ![railway3](../../assets/railway-3.jpg) 25 | 26 | ## 如何更新 27 | 28 | 进入到 GitHub 仓库中,修改 package.json 文件中的 `@waline/vercel` 版本号为最新版本即可。 29 | 30 | ## 如何修改环境变量 31 | 32 | 可以通过 Variables Tab 进入环境变量管理页,修改完成之后会自动重新部署。 33 | 34 | ![railway4](../../assets/railway-4.jpg) 35 | -------------------------------------------------------------------------------- /docs/src/guide/deploy/tidb.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 创建 TiDB 数据库 3 | icon: tidb 4 | --- 5 | 6 | [TiDB](https://github.com/pingcap/tidb) 是一款开源的 NewSQL 数据库。[TiDB Cloud](https://tidbcloud.com/) 则是官方提供的在线版本,它提供了 5GB 的免费额度。下面介绍下如何在 TiDB Cloud 上创建 Waline 数据库。 7 | 8 | ## 创建数据库 9 | 10 | 1. 登录 [TiDB Cloud](https://tidbcloud.com) 后会自动创建实 TiDB 实例,直接点击 cluster0 进入实例 11 | 12 | ![进入实例](../../assets/tidb-1.png) 13 | 14 | 2. 左侧列表选择 Chat2Query 并将 [waline.tidb](https://github.com/walinejs/waline/blob/main/assets/waline.tidb) 内容按照 `;` 为语句分布贴近界面执行。每贴一句点击右上角的运行蓝色按钮,或者使用 Ctrl\/Command + Enter 快捷键执行 15 | ![步骤1](../../assets/tidb-2.png) 16 | ![步骤2](../../assets/tidb-3.png) 17 | ![步骤3](../../assets/tidb-4.png) 18 | ![步骤4](../../assets/tidb-5.png) 19 | ![步骤5](../../assets/tidb-6.png) 20 | 21 | 至此 Waline 数据库就已经创建完成! 22 | 23 | ## 获取连接配置 24 | 25 | 点击左侧的 Overview 按钮进入首页,选择右上角的 Connect 获取连接信息。 26 | 27 | Connect with 选择 `Node.js`。此外还需要点击右下角的 Reset password 生成下密码。 28 | 29 | 这样你就能获取到连接相关的配置了。 30 | 31 | ![获取链接配置](../../assets/tidb-7.png) 32 | -------------------------------------------------------------------------------- /docs/src/guide/deploy/vercel.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Vercel 部署 3 | icon: vercel 4 | order: 1 5 | --- 6 | 7 | 我们发布了 `@waline/vercel` 包作为服务端。Vercel 部署也是我们最推荐的方式。 8 | 9 | 10 | 11 | ## 如何部署 12 | 13 | [![Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fwalinejs%2Fwaline%2Ftree%2Fmain%2Fexample) 14 | 15 | 1. 点击上方按钮,跳转至 Vercel 进行 Server 端部署。 16 | 17 | ::: note 18 | 19 | 如果你未登录的话,Vercel 会让你注册或登录,请使用 GitHub 账户进行快捷登录。 20 | 21 | ::: 22 | 23 | 1. 输入一个你喜欢的 Vercel 项目名称并点击 `Create` 继续: 24 | 25 | ![创建项目](../../assets/vercel-1.png) 26 | 27 | 1. 此时 Vercel 会基于 Waline 模板帮助你新建并初始化仓库,仓库名为你之前输入的项目名。 28 | 29 | ![deploy](../../assets/vercel-3.png) 30 | 31 | 一两分钟后,满屏的烟花会庆祝你部署成功。此时点击 `Go to Dashboard` 可以跳转到应用的控制台。 32 | 33 | ![deploy](../../assets/vercel-4.png) 34 | 35 | 1. 点击顶部的 `Settings` - `Environment Variables` 进入环境变量配置页,并配置三个环境变量 `LEAN_ID`, `LEAN_KEY` 和 `LEAN_MASTER_KEY` 。它们的值分别对应上一步在 LeanCloud 中获得的 `APP ID`, `APP KEY`, `Master Key`。 36 | 37 | ![设置环境变量](../../assets/vercel-5.png) 38 | 39 | ::: note 40 | 41 | 如果你使用 LeanCloud 国内版,请额外配置 `LEAN_SERVER` 环境变量,值为你绑定好的域名。 42 | 43 | ::: 44 | 45 | 1. 环境变量配置完成之后点击顶部的 `Deployments` 点击顶部最新的一次部署右侧的 `Redeploy` 按钮进行重新部署。该步骤是为了让刚才设置的环境变量生效。 46 | 47 | ![redeploy](../../assets/vercel-6.png) 48 | 49 | 1. 此时会跳转到 `Overview` 界面开始部署,等待片刻后 `STATUS` 会变成 `Ready`。此时请点击 `Visit` ,即可跳转到部署好的网站地址,此地址即为你的服务端地址。 50 | 51 | ![redeploy success](../../assets/vercel-7.png) 52 | -------------------------------------------------------------------------------- /docs/src/guide/features/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 功能 3 | icon: feature 4 | dir: 5 | order: 2 6 | expanded: true 7 | index: false 8 | --- 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/src/guide/features/assets/label-admin.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/guide/features/assets/label-admin.jpg -------------------------------------------------------------------------------- /docs/src/guide/features/assets/label-profile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/walinejs/waline/fb7dcbfd98ac5b432a583ddc17c2a131870e68bf/docs/src/guide/features/assets/label-profile.jpg -------------------------------------------------------------------------------- /docs/src/guide/features/i18n.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 多语言支持 3 | icon: i18n 4 | order: 6 5 | --- 6 | 7 | Waline 内置多种语言支持,你也可以自定义 Waline 的语言配置。 8 | 9 | 10 | 11 | ## 客户端 12 | 13 | ### 设置语言 14 | 15 | 你可以通过 `lang` 选项设置 Waline 所用的语言,支持的语言有: 16 | 17 | - zh 18 | - zh-CN 19 | - zh-TW 20 | - en 21 | - en-US 22 | - jp 23 | - jp-JP 24 | - pt-BR 25 | - ru 26 | - ru-RU 27 | - fr-FR 28 | - fr 29 | - vi 30 | - vi-vn 31 | - es 32 | - es-MX 33 | 34 | 例如: 35 | 36 | ```js 37 | Waline.init({ 38 | el: '#waline', 39 | // ... 40 | lang: 'en', 41 | }); 42 | ``` 43 | 44 | ::: tip 45 | 46 | 如果你想要帮助 Waline 添加更多语言支持,我们欢迎你发送 PR 到 [client/config/i18n](https://github.com/walinejs/waline/tree/main/packages/client/src/config/i18n)。 47 | 48 | ::: 49 | 50 | ### 自定义语言 51 | 52 | 你可以通过 `locales` 选项自定义语言,或者设置其中的几项对现有的 UI 文字进行覆盖,详见 [Cookbook → 自定义语言支持](../../cookbook/customize/locale.md) 53 | 54 | ## 服务端 55 | 56 | 服务端接口返回的信息,会根据客户端的入参 lang 参数动态切换语言。 57 | 58 | ### 自定义语言 59 | 60 | 你可以通过 `locales` 选项自定义对应语言的内容,详见 [Cookbook → 自定义语言支持](../../cookbook/customize/locale.md) 61 | -------------------------------------------------------------------------------- /docs/src/guide/features/label.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 用户标签 3 | icon: label 4 | order: 5 5 | --- 6 | 7 | Waline 支持你为登录用户,根据其互动情况设置等级标签和自定义标签。 8 | 9 | 10 | 11 | ## 等级标签 12 | 13 | 你需要在服务端配置 `LEVELS` 变量开启这个功能,详见 [服务端环境变量配置](../../reference/server/env.md#显示)。 14 | 15 | 你可以通过 locales 选项自定义这些等级标签,详见 [多语言](./i18n.md#自定义语言) 16 | 17 | ## 专属标签 18 | 19 | 你可以通过管理端为每位登录用户设定专属标签。 20 | 21 | ![管理员设置标签](./assets/label-admin.jpg) 22 | 23 | 作为登录用户,也可以自己在个人资料页中修改自己的专属标签。 24 | 25 | ![用户设置标签](./assets/label-profile.jpg) 26 | -------------------------------------------------------------------------------- /docs/src/guide/features/reaction.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 文章反应 3 | icon: reaction 4 | order: 4 5 | --- 6 | 7 | Waline 允许用户表达对文章内容的反应。 8 | 9 | 10 | 11 | ## 快速启用 12 | 13 | 想要快速启用反应,你可以在初始化时设置 `reaction` 选项为 `true` 来显示默认的反应列表: 14 | 15 | ```js 16 | Waline.init({ 17 | el: '#waline', 18 | // ... 19 | reaction: true, // 开启反应 20 | }); 21 | ``` 22 | 23 | Waline 会在评论框的上方,显示默认的反应列表。 24 | 25 | ## 自定义反应 26 | 27 | 如果你需要自定义这些反应表情,你可以转入一个包含反应表情图片地址数组,表达你想要用户选择的反应: 28 | 29 | ```js 30 | Waline.init({ 31 | el: '#waline', 32 | // ... 33 | reaction: [ 34 | 'https://unpkg.com/@waline/emojis@1.1.0/weibo/weibo_heart_eyes.png', 35 | 'https://unpkg.com/@waline/emojis@1.1.0/weibo/weibo_dog_joy.png', 36 | 'https://unpkg.com/@waline/emojis@1.1.0/weibo/weibo_dog_consider.png', 37 | 'https://unpkg.com/@waline/emojis@1.1.0/weibo/weibo_sob.png', 38 | ], 39 | }); 40 | ``` 41 | 42 | 同时,你可以通过 `locale` 中的 `reactionTitle` 来自定义反应的标题,也可以通过 `reaction0` 到 `reaction8` 来自定义反应表情的名称,详见 [多语言设置](./i18n.md)。 43 | 44 | ## 注意事项 45 | 46 | ::: tip 数量限制 47 | 48 | Waline 最多支持 9 个反应,添加的反应数量可以小于 9 个,这不会产生任何问题。 49 | 50 | ::: 51 | 52 | ::: warning 计数规则 53 | 54 | 反应的计数是基于位置的。 55 | 56 | 如果你需要对反应重新进行排序与调整,可参见 [#1451](https://github.com/walinejs/waline/issues/1451#issuecomment-1264555264)。 57 | 58 | ::: 59 | -------------------------------------------------------------------------------- /docs/src/guide/features/safety.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 安全性 3 | icon: safe 4 | order: -10 5 | --- 6 | 7 | Waline 评论系统的安全性是我们的首要考虑。我们将在这里介绍 Waline 的安全性。 8 | 9 | 10 | 11 | ## 评论安全 12 | 13 | ### 防 XSS 攻击 14 | 15 | Waline 在服务端使用 [DOMPurify](https://github.com/cure53/DOMPurify) 过滤每一个评论输入,以防止潜在的 XSS 攻击。这意味着你将不能使用 `