Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0a89426c93 | ||
|
|
7a026ef0e2 | ||
|
|
855f6c261f | ||
|
|
7099598a92 | ||
|
|
ad8851ea94 | ||
|
|
def9dc2707 | ||
|
|
91228a9446 |
No files matched your search
@@ -13,50 +13,32 @@ jobs:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
defaults:
|
||||
run:
|
||||
# set for building docs
|
||||
working-directory: ./docs
|
||||
|
||||
steps:
|
||||
# - name: Wait for other docs build to succeed
|
||||
# uses: lewagon/wait-on-check-action@v1.2.0
|
||||
# with:
|
||||
# running-workflow-name: 'Docs CN Mirror Deploy'
|
||||
# check-name: 'Build Docs'
|
||||
# ref: ${{ github.ref }}
|
||||
# repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
# allowed-conclusions: success,skipped,cancelled
|
||||
# wait-interval: 10
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Use pnpm
|
||||
uses: pnpm/action-setup@v2
|
||||
|
||||
- name: Use pnpm
|
||||
uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 8
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
cache: "pnpm"
|
||||
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.x
|
||||
registry-url: https://registry.npmjs.org/
|
||||
cache: 'pnpm'
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
- name: Build Docs
|
||||
run: pnpm docs:build
|
||||
|
||||
- name: Build Docs
|
||||
run: pnpm docs:build
|
||||
|
||||
- name: Deploy
|
||||
uses: TencentCloud/cos-action@v1
|
||||
with:
|
||||
secret_id: ${{ secrets.TENCENT_CLOUD_SECRET_ID }}
|
||||
secret_key: ${{ secrets.TENCENT_CLOUD_SECRET_KEY }}
|
||||
cos_bucket: ${{ secrets.DOCS_CN_COS_BUCKET }}
|
||||
cos_region: ${{ secrets.DOCS_CN_COS_REGION }}
|
||||
local_path: .vitepress/dist/
|
||||
remote_path: /
|
||||
clean: true
|
||||
- name: Deploy
|
||||
uses: TencentCloud/cos-action@v1
|
||||
with:
|
||||
secret_id: ${{ secrets.TENCENT_CLOUD_SECRET_ID }}
|
||||
secret_key: ${{ secrets.TENCENT_CLOUD_SECRET_KEY }}
|
||||
cos_bucket: ${{ secrets.DOCS_CN_COS_BUCKET }}
|
||||
cos_region: ${{ secrets.DOCS_CN_COS_REGION }}
|
||||
local_path: .vitepress/dist/
|
||||
remote_path: /
|
||||
clean: true
|
||||
@@ -0,0 +1,32 @@
|
||||
name: Test Docs
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- "docs/**"
|
||||
push:
|
||||
paths:
|
||||
- "docs/**"
|
||||
|
||||
jobs:
|
||||
test_docs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Use pnpm
|
||||
uses: pnpm/action-setup@v2
|
||||
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18.x
|
||||
cache: pnpm
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
|
||||
- name: Build Docs
|
||||
run: pnpm docs:build
|
||||
@@ -1,4 +1,30 @@
|
||||
|
||||
## [v2.7.2](https://github.com/ArtalkJS/Artalk/compare/v2.7.1...v2.7.2) (2023-12-20)
|
||||
|
||||
### Features
|
||||
|
||||
* patch `locale` config from `zh-cn` to `zh-CN` ([#678](https://github.com/ArtalkJS/Artalk/issues/678))
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **sidebar:** sidebar language switch and config save issue ([#708](https://github.com/ArtalkJS/Artalk/issues/708))
|
||||
* **ui:** add `referrerpolicy` attribute for iframe ([#687](https://github.com/ArtalkJS/Artalk/issues/687)) ([#707](https://github.com/ArtalkJS/Artalk/issues/707))
|
||||
* **ui/dark-mode:** potential memory leak issue in auto mode ([#688](https://github.com/ArtalkJS/Artalk/issues/688))
|
||||
* **ui/pagination:** auto switch page by url hashtag issue ([#693](https://github.com/ArtalkJS/Artalk/issues/693))
|
||||
* **ui/sidebar:** refactor settings and fix save issue ([#677](https://github.com/ArtalkJS/Artalk/issues/677)) ([#706](https://github.com/ArtalkJS/Artalk/issues/706))
|
||||
|
||||
### Code Refactoring
|
||||
|
||||
* **ui:** move window references into function scope ([#675](https://github.com/ArtalkJS/Artalk/issues/675))
|
||||
* **ui/api:** losing coupling between `Api` and `User`
|
||||
* **ui/user:** user class no longer globally singleton
|
||||
|
||||
### Documentation
|
||||
|
||||
* **i18n:** add translation for `open` button
|
||||
* **refactor:** organize the pkgs and fix some issues ([#702](https://github.com/ArtalkJS/Artalk/issues/702))
|
||||
|
||||
|
||||
## [v2.7.1](https://github.com/ArtalkJS/Artalk/compare/v2.7.0...v2.7.1) (2023-12-17)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
/.vitepress/dist/
|
||||
/.vitepress/cache/
|
||||
/public/http-api.html
|
||||
@@ -1,2 +0,0 @@
|
||||
shamefully-hoist=true
|
||||
auto-install-peers=true
|
||||
@@ -1,211 +0,0 @@
|
||||
import { defineConfig } from 'vitepress'
|
||||
import iterator from 'markdown-it-for-inline'
|
||||
import * as Version from '../code/ArtalkVersion.json'
|
||||
|
||||
export default defineConfig({
|
||||
title: 'Artalk',
|
||||
description: '一款简洁的自托管评论系统',
|
||||
lang: 'zh-CN',
|
||||
|
||||
head: [
|
||||
['link', { rel: 'icon', href: '/favicon.png' }],
|
||||
['meta', { name: 'viewport', content: 'width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, target-densitydpi=device-dpi' }],
|
||||
// artalk
|
||||
// ['link', { href: `https://npm.elemecdn.com/artalk@${Version.latest}/dist/Artalk.css`, rel: 'stylesheet' }],
|
||||
['link', { href: `https://artalk.qwqaq.com/dist/Artalk.css`, rel: 'stylesheet' }],
|
||||
// ['script', { src: ArtalkCDN.JS }],
|
||||
// light gallery
|
||||
['link', { href: 'https://npm.elemecdn.com/lightgallery@2.3.0/css/lightgallery.css', rel: 'stylesheet' }],
|
||||
['script', { src: 'https://npm.elemecdn.com/lightgallery@2.3.0/lightgallery.min.js' }],
|
||||
// katex
|
||||
// ['link', { href: "https://npm.elemecdn.com/katex@0.15.3/dist/katex.min.css", rel: 'stylesheet' }],
|
||||
// ['script', { src: 'https://npm.elemecdn.com/katex@0.15.3/dist/katex.min.js' }],
|
||||
// ['script', { src: 'https://npm.elemecdn.com/@artalkjs/plugin-katex/dist/artalk-plugin-katex.js' }],
|
||||
],
|
||||
|
||||
lastUpdated: true,
|
||||
|
||||
markdown: {
|
||||
// @link https://github.com/shikijs/shiki
|
||||
theme: {
|
||||
light: 'github-light',
|
||||
dark: 'github-dark',
|
||||
},
|
||||
config: (md) => {
|
||||
md.use(iterator, 'artalk_version', 'text', function (tokens, idx) {
|
||||
tokens[idx].content = tokens[idx].content.replace(/:ArtalkVersion:/g, Version.latest)
|
||||
});
|
||||
md.use(iterator, 'artalk_version_link', 'link_open', (tokens, idx) => {
|
||||
const href = tokens[idx].attrGet('href')
|
||||
tokens[idx].attrSet('href', href.replace(/:ArtalkVersion:/g, Version.latest))
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
locales: {
|
||||
root: {
|
||||
label: '简体中文',
|
||||
lang: 'zh'
|
||||
},
|
||||
en: {
|
||||
label: 'English',
|
||||
lang: 'en',
|
||||
link: 'https://artalk-js-org.translate.goog/guide/intro?_x_tr_sl=auto&_x_tr_tl=en-US&_x_tr_hl=en-US&_x_tr_pto=wapp'
|
||||
// link: '/en/'
|
||||
}
|
||||
},
|
||||
|
||||
themeConfig: {
|
||||
sidebar: {
|
||||
"/guide/": [
|
||||
{
|
||||
text: "快速开始",
|
||||
collapsed: false,
|
||||
items: [
|
||||
{ text: '项目介绍', link: '/guide/intro.md' },
|
||||
{ text: '程序部署', link: '/guide/deploy.md' },
|
||||
{ text: '数据迁移', link: '/guide/transfer.md' },
|
||||
]
|
||||
},
|
||||
{
|
||||
text: "核心指南",
|
||||
collapsed: false,
|
||||
items: [
|
||||
{ text: '侧边栏', link: '/guide/frontend/sidebar.md' },
|
||||
{ text: '邮件通知', link: '/guide/backend/email.md' },
|
||||
{ text: '多元推送', link: '/guide/backend/admin_notify.md' },
|
||||
{ text: '评论审核', link: '/guide/backend/moderator.md' },
|
||||
{ text: '验证码', link: '/guide/backend/captcha.md' },
|
||||
{ text: '图片上传', link: '/guide/backend/img-upload.md' },
|
||||
{ text: '账户与多站点', link: '/guide/backend/multi-site.md' },
|
||||
{ text: '解析相对路径', link: '/guide/backend/relative-path.md' },
|
||||
{ text: '如何配置界面', link: '/guide/backend/fe-control.md' },
|
||||
{ text: 'English (i18n)', link: '/guide/frontend/i18n.md' },
|
||||
]
|
||||
},
|
||||
{
|
||||
text: "进阶指南",
|
||||
collapsed: false,
|
||||
items: [
|
||||
{ text: '表情包', link: '/guide/frontend/emoticons.md' },
|
||||
{ text: '浏览量统计', link: '/guide/frontend/pv.md' },
|
||||
{ text: 'Latex', link: '/guide/frontend/latex.md' },
|
||||
{ text: '图片灯箱', link: '/guide/frontend/lightbox.md' },
|
||||
{ text: 'IP 归属地', link: '/guide/frontend/ip-region.md' },
|
||||
{ text: '精简版本', link: '/guide/frontend/artalk-lite.md' },
|
||||
{ text: '置入博客', link: '/guide/frontend/import-blog.md' },
|
||||
{ text: '置入框架', link: '/guide/frontend/import-framework.md' },
|
||||
{ text: '前端 API', link: '/develop/fe-api.md', },
|
||||
{ text: '开发文档', link: '/develop/index.md', },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "配置文档",
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: '后端配置', link: '/guide/backend/config.md' },
|
||||
{ text: '前端配置', link: '/guide/frontend/config.md' },
|
||||
]
|
||||
},
|
||||
{
|
||||
text: "部署说明",
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: '守护进程', link: '/guide/backend/daemon.md' },
|
||||
{ text: '反向代理', link: '/guide/backend/reverse-proxy.md' },
|
||||
{ text: '编译构建', link: '/guide/backend/build.md' },
|
||||
{ text: '程序升级', link: '/guide/backend/update.md' },
|
||||
{ text: 'Docker', link: '/guide/backend/docker.md' },
|
||||
]
|
||||
},
|
||||
{
|
||||
text: '更多内容',
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: '安全防范', link: '/guide/security.md' },
|
||||
{ text: '扩展阅读', link: '/guide/extras.md' },
|
||||
{ text: '案例展示', link: '/guide/cases.md' },
|
||||
{ text: '关于我们', link: '/guide/about.md' },
|
||||
]
|
||||
}
|
||||
],
|
||||
"/develop/": [
|
||||
{
|
||||
text: '开发文档',
|
||||
items: [
|
||||
{ text: '开发说明', link: '/develop/index.md', },
|
||||
{ text: '前端 API', link: '/develop/fe-api.md', },
|
||||
{ text: '前端 Event', link: '/develop/event.md', },
|
||||
{ text: '插件开发', link: '/develop/plugs.md' },
|
||||
{ text: '🔬 HTTP API', link: 'https://artalk.js.org/http-api.html', },
|
||||
{ text: '📖 Contributing Guide', link: 'https://github.com/ArtalkJS/Artalk/blob/master/CONTRIBUTING.md' },
|
||||
{ text: '🔖 Code of Conduct', link: 'https://github.com/ArtalkJS/Artalk/blob/master/CODE_OF_CONDUCT.md' },
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
nav: [
|
||||
// NavbarItem
|
||||
{
|
||||
text: '介绍',
|
||||
link: '/guide/intro',
|
||||
},
|
||||
{
|
||||
text: '部署',
|
||||
link: '/guide/deploy',
|
||||
},
|
||||
{
|
||||
text: '配置',
|
||||
link: '/guide/backend/config',
|
||||
},
|
||||
{
|
||||
text: '迁移',
|
||||
link: '/guide/transfer',
|
||||
},
|
||||
{
|
||||
text: '案例',
|
||||
link: '/guide/cases',
|
||||
},
|
||||
{
|
||||
text: '开发',
|
||||
link: '/develop/',
|
||||
},
|
||||
// NavbarGroup
|
||||
{
|
||||
text: '传送',
|
||||
items: [
|
||||
{
|
||||
text: '代码仓库',
|
||||
link: 'https://github.com/ArtalkJS/Artalk',
|
||||
},
|
||||
{
|
||||
text: '文档镜像 (国内)',
|
||||
link: 'https://artalk-docs.qwqaq.com'
|
||||
}
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
socialLinks: [
|
||||
{ icon: 'github', link: 'https://github.com/ArtalkJS/Artalk' }
|
||||
],
|
||||
|
||||
search: {
|
||||
provider: 'algolia',
|
||||
options: {
|
||||
appId: '2WNJ32WVTY',
|
||||
apiKey: '6c6ebc345a87b738264f19095b78c91c',
|
||||
indexName: 'artalk-js',
|
||||
searchParameters: {
|
||||
facetFilters: ['lang:zh-CN']
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
editLink: {
|
||||
pattern: 'https://github.com/ArtalkJS/Artalk/edit/master/docs/:path',
|
||||
text: '完善文档'
|
||||
},
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,2 @@
|
||||
.vitepress/dist/**
|
||||
.vitepress/cache/**
|
||||
@@ -0,0 +1,253 @@
|
||||
import { defineConfig } from "vitepress";
|
||||
import iterator from "markdown-it-for-inline";
|
||||
import * as Version from "../code/ArtalkVersion.json";
|
||||
|
||||
export default defineConfig({
|
||||
title: "Artalk",
|
||||
description: "一款简洁的自托管评论系统",
|
||||
lang: "zh-CN",
|
||||
|
||||
head: [
|
||||
["link", { rel: "icon", href: "/favicon.png" }],
|
||||
[
|
||||
"meta",
|
||||
{
|
||||
name: "viewport",
|
||||
content:
|
||||
"width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, target-densitydpi=device-dpi",
|
||||
},
|
||||
],
|
||||
// artalk
|
||||
// ['link', { href: `https://npm.elemecdn.com/artalk@${Version.latest}/dist/Artalk.css`, rel: 'stylesheet' }],
|
||||
[
|
||||
"link",
|
||||
{ href: `https://artalk.qwqaq.com/dist/Artalk.css`, rel: "stylesheet" },
|
||||
],
|
||||
// ['script', { src: ArtalkCDN.JS }],
|
||||
// light gallery
|
||||
[
|
||||
"link",
|
||||
{
|
||||
href: "https://npm.elemecdn.com/lightgallery@2.3.0/css/lightgallery.css",
|
||||
rel: "stylesheet",
|
||||
},
|
||||
],
|
||||
[
|
||||
"script",
|
||||
{
|
||||
src: "https://npm.elemecdn.com/lightgallery@2.3.0/lightgallery.min.js",
|
||||
},
|
||||
],
|
||||
// katex
|
||||
// ['link', { href: "https://npm.elemecdn.com/katex@0.15.3/dist/katex.min.css", rel: 'stylesheet' }],
|
||||
// ['script', { src: 'https://npm.elemecdn.com/katex@0.15.3/dist/katex.min.js' }],
|
||||
// ['script', { src: 'https://npm.elemecdn.com/@artalkjs/plugin-katex/dist/artalk-plugin-katex.js' }],
|
||||
],
|
||||
|
||||
lastUpdated: true,
|
||||
|
||||
markdown: {
|
||||
// @link https://github.com/shikijs/shiki
|
||||
theme: {
|
||||
light: "github-light",
|
||||
dark: "github-dark",
|
||||
},
|
||||
config: (md) => {
|
||||
md.use(iterator, "artalk_version", "text", function (tokens, idx) {
|
||||
tokens[idx].content = tokens[idx].content.replace(
|
||||
/:ArtalkVersion:/g,
|
||||
Version.latest
|
||||
);
|
||||
});
|
||||
md.use(iterator, "artalk_version_link", "link_open", (tokens, idx) => {
|
||||
const href = tokens[idx].attrGet("href");
|
||||
tokens[idx].attrSet(
|
||||
"href",
|
||||
href.replace(/:ArtalkVersion:/g, Version.latest)
|
||||
);
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
locales: {
|
||||
root: {
|
||||
label: "简体中文",
|
||||
lang: "zh",
|
||||
link: "https://artalk.js.org/",
|
||||
},
|
||||
en: {
|
||||
label: "English",
|
||||
lang: "en",
|
||||
link: "https://artalk-js-org.translate.goog/guide/intro?_x_tr_sl=auto&_x_tr_tl=en-US&_x_tr_hl=en-US&_x_tr_pto=wapp",
|
||||
},
|
||||
},
|
||||
|
||||
themeConfig: {
|
||||
sidebar: {
|
||||
"/guide/": [
|
||||
{
|
||||
text: "快速开始",
|
||||
collapsed: false,
|
||||
items: [
|
||||
{ text: "项目介绍", link: "/guide/intro.md" },
|
||||
{ text: "程序部署", link: "/guide/deploy.md" },
|
||||
{ text: "数据迁移", link: "/guide/transfer.md" },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "核心指南",
|
||||
collapsed: false,
|
||||
items: [
|
||||
{ text: "侧边栏", link: "/guide/frontend/sidebar.md" },
|
||||
{ text: "邮件通知", link: "/guide/backend/email.md" },
|
||||
{ text: "多元推送", link: "/guide/backend/admin_notify.md" },
|
||||
{ text: "评论审核", link: "/guide/backend/moderator.md" },
|
||||
{ text: "验证码", link: "/guide/backend/captcha.md" },
|
||||
{ text: "图片上传", link: "/guide/backend/img-upload.md" },
|
||||
{ text: "账户与多站点", link: "/guide/backend/multi-site.md" },
|
||||
{ text: "解析相对路径", link: "/guide/backend/relative-path.md" },
|
||||
{ text: "如何配置界面", link: "/guide/backend/fe-control.md" },
|
||||
{ text: "English (i18n)", link: "/guide/frontend/i18n.md" },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "进阶指南",
|
||||
collapsed: false,
|
||||
items: [
|
||||
{ text: "表情包", link: "/guide/frontend/emoticons.md" },
|
||||
{ text: "浏览量统计", link: "/guide/frontend/pv.md" },
|
||||
{ text: "Latex", link: "/guide/frontend/latex.md" },
|
||||
{ text: "图片灯箱", link: "/guide/frontend/lightbox.md" },
|
||||
{ text: "IP 归属地", link: "/guide/frontend/ip-region.md" },
|
||||
{ text: "精简版本", link: "/guide/frontend/artalk-lite.md" },
|
||||
{ text: "置入博客", link: "/guide/frontend/import-blog.md" },
|
||||
{ text: "置入框架", link: "/guide/frontend/import-framework.md" },
|
||||
{ text: "前端 API", link: "/develop/fe-api.md" },
|
||||
{ text: "开发文档", link: "/develop/index.md" },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "配置文档",
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: "后端配置", link: "/guide/backend/config.md" },
|
||||
{ text: "前端配置", link: "/guide/frontend/config.md" },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "部署说明",
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: "守护进程", link: "/guide/backend/daemon.md" },
|
||||
{ text: "反向代理", link: "/guide/backend/reverse-proxy.md" },
|
||||
{ text: "编译构建", link: "/guide/backend/build.md" },
|
||||
{ text: "程序升级", link: "/guide/backend/update.md" },
|
||||
{ text: "Docker", link: "/guide/backend/docker.md" },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "更多内容",
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: "安全防范", link: "/guide/security.md" },
|
||||
{ text: "扩展阅读", link: "/guide/extras.md" },
|
||||
{ text: "案例展示", link: "/guide/cases.md" },
|
||||
{ text: "关于我们", link: "/guide/about.md" },
|
||||
],
|
||||
},
|
||||
],
|
||||
"/develop/": [
|
||||
{
|
||||
text: "开发文档",
|
||||
items: [
|
||||
{ text: "开发说明", link: "/develop/index.md" },
|
||||
{ text: "前端 API", link: "/develop/fe-api.md" },
|
||||
{ text: "前端 Event", link: "/develop/event.md" },
|
||||
{ text: "插件开发", link: "/develop/plugs.md" },
|
||||
{
|
||||
text: "🔬 HTTP API",
|
||||
link: "https://artalk.js.org/http-api.html",
|
||||
},
|
||||
{
|
||||
text: "📖 Contributing Guide",
|
||||
link: "https://github.com/ArtalkJS/Artalk/blob/master/CONTRIBUTING.md",
|
||||
},
|
||||
{
|
||||
text: "🔖 Code of Conduct",
|
||||
link: "https://github.com/ArtalkJS/Artalk/blob/master/CODE_OF_CONDUCT.md",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
nav: [
|
||||
// NavbarItem
|
||||
{
|
||||
text: "介绍",
|
||||
link: "/guide/intro",
|
||||
},
|
||||
{
|
||||
text: "部署",
|
||||
link: "/guide/deploy",
|
||||
},
|
||||
{
|
||||
text: "配置",
|
||||
link: "/guide/backend/config",
|
||||
},
|
||||
{
|
||||
text: "迁移",
|
||||
link: "/guide/transfer",
|
||||
},
|
||||
{
|
||||
text: "案例",
|
||||
link: "/guide/cases",
|
||||
},
|
||||
{
|
||||
text: "开发",
|
||||
link: "/develop/",
|
||||
},
|
||||
// NavbarGroup
|
||||
{
|
||||
text: "传送",
|
||||
items: [
|
||||
{
|
||||
text: "代码仓库",
|
||||
link: "https://github.com/ArtalkJS/Artalk",
|
||||
},
|
||||
{
|
||||
text: "文档镜像 (国内)",
|
||||
link: "https://artalk-docs.qwqaq.com",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
socialLinks: [
|
||||
{ icon: "github", link: "https://github.com/ArtalkJS/Artalk" },
|
||||
],
|
||||
|
||||
search: {
|
||||
provider: "algolia",
|
||||
options: {
|
||||
appId: "2WNJ32WVTY",
|
||||
apiKey: "6c6ebc345a87b738264f19095b78c91c",
|
||||
indexName: "artalk-js",
|
||||
searchParameters: {
|
||||
facetFilters: ["lang:zh-CN"],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
editLink: {
|
||||
pattern: "https://github.com/ArtalkJS/Artalk/edit/master/docs/:path",
|
||||
text: "完善文档",
|
||||
},
|
||||
},
|
||||
|
||||
vite: {
|
||||
server: {
|
||||
open: "/guide/intro.html",
|
||||
},
|
||||
},
|
||||
});
|
||||
@@ -1,7 +1,5 @@
|
||||
<template>
|
||||
<ClientOnly>
|
||||
<div ref="el" style="margin-top: 20px;"></div>
|
||||
</ClientOnly>
|
||||
<div ref="el" style="margin-top: 20px;"></div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
@@ -17,10 +15,12 @@ const page = useData().page
|
||||
let artalk: Artalk
|
||||
|
||||
onMounted(() => {
|
||||
initArtalk(getConfByPage())
|
||||
nextTick(() => {
|
||||
initArtalk(getConfByPage())
|
||||
})
|
||||
})
|
||||
|
||||
watch(() => router.route.data.relativePath, () => {
|
||||
watch(() => router.route.path, () => {
|
||||
nextTick(() => {
|
||||
artalk.update(getConfByPage())
|
||||
artalk.reload()
|
||||
@@ -32,6 +32,7 @@ onUnmounted(() => {
|
||||
})
|
||||
|
||||
function initArtalk(conf: any) {
|
||||
// TODO: remove dynamic import after the new version released
|
||||
import('artalk').then(({ default: Artalk }) => {
|
||||
artalk = Artalk.init({
|
||||
el: el.value,
|
||||
@@ -48,7 +49,7 @@ function initArtalk(conf: any) {
|
||||
|
||||
function getConfByPage() {
|
||||
return {
|
||||
pageKey: 'https://artalk.js.org'+location.pathname,
|
||||
pageKey: 'https://artalk.js.org'+router.route.path,
|
||||
pageTitle: page.value.title,
|
||||
server: 'https://artalk.qwqaq.com',
|
||||
site: 'ArtalkDocs',
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,6 +1,8 @@
|
||||
## Artalk Documentation
|
||||
# Artalk Documentation
|
||||
|
||||
> The Documentation of Artalk
|
||||
[](https://app.netlify.com/sites/artalk/deploys)
|
||||
|
||||
Documentation of Artalk
|
||||
|
||||
## Build
|
||||
|
||||
@@ -11,9 +13,8 @@ pnpm docs:build
|
||||
|
||||
## Deploy
|
||||
|
||||
[](https://app.netlify.com/sites/artalk/deploys)
|
||||
|
||||
文档通过 [Netlify](https://www.netlify.com/) 对 master 分支进行自动部署。
|
||||
|
||||
## Licensed
|
||||
|
||||
CC BY-NC-SA 4.0
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,3 @@
|
||||
<script setup lang="ts">
|
||||
if (!import.meta.env.SSR) window.location = 'https://artalk.js.org/';
|
||||
</script>
|
||||
Loaded 100 of 308 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user