Skip to content

Commit

Permalink
feat: improve performance of scan mode (#803)
Browse files Browse the repository at this point in the history
* feat: improve performance of scan mode

* docs: add more docs and refine doc website
  • Loading branch information
suxb201 authored May 22, 2024
1 parent 693c7bc commit cd735a3
Show file tree
Hide file tree
Showing 12 changed files with 1,112 additions and 613 deletions.
140 changes: 25 additions & 115 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,126 +1,36 @@
import { defineConfig } from 'vitepress'
import { defineConfigWithTheme } from "vitepress"
import { en } from "./en"
import { zh } from "./zh"

// https://vitepress.dev/reference/site-config
export default defineConfig({
head: [['link', { rel: 'icon', href: '/RedisShake/favicon.ico' }]],
export default defineConfigWithTheme({
head: [["link", { rel: "icon", href: "/RedisShake/favicon.ico" }]],
base: "/RedisShake/",
title: "RedisShake",
description: "RedisShake is a tool for processing and migrating Redis data.",
srcDir: './src',
locales: {
root: {
label: '中文',
lang: 'zh', // optional, will be added as `lang` attribute on `html` tag
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
nav: [
{ text: '主页', link: '/' },
{ text: '使用文档', link: '/zh/guide/getting-started' },
{ text: '云原生内存数据库 Tair', link: 'https://www.aliyun.com/product/apsaradb/kvstore/tair' }
],
sidebar: [
{
text: '介绍',
items: [
{ text: '什么是 RedisShake', link: '/zh/guide/introduction' },
{ text: '快速上手', link: '/zh/guide/getting-started' },
{ text: '配置', link: '/zh/guide/config' },
{ text: '迁移模式选择', link: '/zh/guide/mode' },
]
},
{
text: 'Reader',
items: [
{ text: 'Sync Reader', link: '/zh/reader/sync_reader' },
{ text: 'Scan Reader', link: '/zh/reader/scan_reader' },
{ text: 'RDB Reader', link: '/zh/reader/rdb_reader' },
]
},
{
text: 'Writer',
items: [
{ text: 'Redis Writer', link: '/zh/writer/redis_writer' },
]
},
{
text: 'Function',
items: [
{ text: '什么是 function', link: '/zh/function/introduction' },
{ text: '最佳实践', link: '/zh/function/best_practices' }
]
},
{
text: 'Others',
items: [
{ text: 'Redis Modules', link: '/zh/others/modules' },
]
},
],
footer: {
message: 'Released under the MIT License.',
copyright: 'Copyright © 2019-present Tair'
}
}
},
en: {
label: 'English',
lang: 'en', // optional, will be added as `lang` attribute on `html` tag
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
nav: [
{ text: 'Home', link: '/en/' },
{ text: 'User Guide', link: '/en/guide/getting-started' },
{ text: 'Tair', link: 'https://www.alibabacloud.com/product/tair' }
],
sidebar: [
{
text: 'Introduction',
items: [
{ text: 'What is RedisShake', link: '/en/guide/introduction' },
{ text: 'Getting Started', link: '/en/guide/getting-started' },
{ text: 'Configuration', link: '/en/guide/config' },
{ text: 'Migration Mode Selection', link: '/en/guide/mode' },
]
},
{
text: 'Reader',
items: [
{ text: 'Sync Reader', link: '/en/reader/sync_reader' },
{ text: 'Scan Reader', link: '/en/reader/scan_reader' },
{ text: 'RDB Reader', link: '/en/reader/rdb_reader' },
]
},
{
text: 'Writer',
items: [
{ text: 'Redis Writer', link: '/en/writer/redis_writer' },
]
},
{
text: 'Function',
items: [
{ text: 'What is function', link: '/en/function/introduction' },
{ text: 'Best Practices', link: '/en/function/best_practices' }
]
},
{
text: 'Others',
items: [
{ text: 'Redis Modules', link: '/en/others/modules' },
]
},
],
footer: {
message: 'Released under the MIT License.',
copyright: 'Copyright © 2019-present Tair'
}
}
},
srcDir: "./src",

locales: {
zh: { label: "简体中文", ...zh },
en: { label: "English", ...en },
},
themeConfig: {
nav: zh.themeConfig?.nav,
socialLinks: [
{ icon: 'github', link: 'https://github.com/tair-opensource/RedisShake' }
{ icon: "github", link: "https://github.com/tair-opensource/RedisShake" }
],
editLink: {
pattern: "https://github.com/tair-opensource/RedisShake/tree/v4/docs/src/:path"
},
lastUpdated: {
text: "Updated at",
formatOptions: {
dateStyle: "full",
timeStyle: "medium"
}
},
footer: {
message: "Released under the MIT License.",
copyright: "Copyright © 2019-present Tair"
}
}
})
64 changes: 64 additions & 0 deletions docs/.vitepress/en.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import { createRequire } from 'module'
import { defineConfig, type DefaultTheme } from 'vitepress'

const require = createRequire(import.meta.url)
const pkg = require('vitepress/package.json')

export const en = defineConfig({
lang: 'en-US',
description: 'Vite & Vue powered static site generator.',

themeConfig: {
nav: nav(),
sidebar: sidebar(),
}
})

function nav(): DefaultTheme.NavItem[] {
return [
{ text: 'Home', link: '/en/' },
{ text: 'User Guide', link: '/en/guide/getting-started' },
{ text: 'Tair', link: 'https://www.alibabacloud.com/product/tair' }
]
}

function sidebar(): DefaultTheme.SidebarItem[] {
return [
{
text: 'Introduction',
items: [
{ text: 'What is RedisShake', link: '/en/guide/introduction' },
{ text: 'Getting Started', link: '/en/guide/getting-started' },
{ text: 'Configuration', link: '/en/guide/config' },
{ text: 'Migration Mode Selection', link: '/en/guide/mode' },
]
},
{
text: 'Reader',
items: [
{ text: 'Sync Reader', link: '/en/reader/sync_reader' },
{ text: 'Scan Reader', link: '/en/reader/scan_reader' },
{ text: 'RDB Reader', link: '/en/reader/rdb_reader' },
]
},
{
text: 'Writer',
items: [
{ text: 'Redis Writer', link: '/en/writer/redis_writer' },
]
},
{
text: 'Function',
items: [
{ text: 'What is function', link: '/en/function/introduction' },
{ text: 'Best Practices', link: '/en/function/best_practices' }
]
},
{
text: 'Others',
items: [
{ text: 'Redis Modules', link: '/en/others/modules' },
]
},
]
}
63 changes: 63 additions & 0 deletions docs/.vitepress/zh.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import { createRequire } from 'module'
import { defineConfig, type DefaultTheme } from 'vitepress'

const require = createRequire(import.meta.url)
const pkg = require('vitepress/package.json')

export const zh = defineConfig({
lang: 'zh-Hans',
themeConfig: {
nav: nav(),
sidebar: sidebar(),
}
})

function nav(): DefaultTheme.NavItem[] {
return [
{ text: '主页', link: '/' },
{ text: '使用文档', link: '/zh/guide/getting-started' },
{ text: '云原生内存数据库 Tair', link: 'https://www.aliyun.com/product/apsaradb/kvstore/tair' }
]
}

function sidebar(): DefaultTheme.SidebarItem[] {
return [
{
text: '介绍',
items: [
{ text: '什么是 RedisShake', link: '/zh/guide/introduction' },
{ text: '快速上手', link: '/zh/guide/getting-started' },
{ text: '配置', link: '/zh/guide/config' },
{ text: '迁移模式选择', link: '/zh/guide/mode' },
]
},
{
text: 'Reader',
items: [
{ text: 'Sync Reader', link: '/zh/reader/sync_reader' },
{ text: 'Scan Reader', link: '/zh/reader/scan_reader' },
{ text: 'RDB Reader', link: '/zh/reader/rdb_reader' },
]
},
{
text: 'Writer',
items: [
{ text: 'Redis Writer', link: '/zh/writer/redis_writer' },
]
},
{
text: 'Function',
items: [
{ text: '什么是 function', link: '/zh/function/introduction' },
{ text: '最佳实践', link: '/zh/function/best_practices' }
]
},
{
text: 'Others',
items: [
{ text: 'Redis Modules', link: '/zh/others/modules' },
{ text: '如何判断数据一致', link: '/zh/others/consistent' },
]
},
]
}
Loading

0 comments on commit cd735a3

Please sign in to comment.