Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #34

Merged
merged 4 commits into from
Dec 14, 2023
Merged

Dev #34

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
133 changes: 88 additions & 45 deletions .vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -1,31 +1,32 @@
import { defineConfig } from "vitepress";
import { defineConfig } from 'vitepress';
// @ts-ignore
import { siteMetadata } from "./site-meta";
const siderbarConfig = require("./../scripts/siderbar");
import { siteMetadata } from './site-meta';
const siderbarConfig = require('./../scripts/siderbar');

const editLinkPattern =
"https://github.com/longbridgeapp/whale-docs/edit/dev/locales/:path";
'https://github.com/longbridgeapp/whale-docs/edit/dev/locales/:path';

// https://vitepress.dev/reference/site-config
export default defineConfig({
title: "Longbridge Whale Docs",
base: "/",
title: 'Longbridge Whale Docs',
base: '/',
description:
"Whale 為券商提供一站式、開箱即用的產品和解決方案,包含 App、交易、風控、清結算、CRM、智能營銷等前中後台系統,以及行情報價、資訊、基本面等數據服務,同時 Whale 也集成了銀行通道業務、股票通道業務、期權通道業務、基金通道業務、KYC/AML 等服務",
'Whale 為券商提供一站式、開箱即用的產品和解決方案,包含 App、交易、風控、清結算、CRM、智能營銷等前中後台系統,以及行情報價、資訊、基本面等數據服務,同時 Whale 也集成了銀行通道業務、股票通道業務、期權通道業務、基金通道業務、KYC/AML 等服務',
ignoreDeadLinks: true,
appearance: false,
lang: "zh-HK",
lang: 'zh-HK',
cleanUrls: true,
srcExclude: ["SUMMARY.md", "zh-HK.md", "zh-CN.md", "en.md"],
srcDir: "locales",
srcExclude: ['SUMMARY.md', 'zh-HK.md', 'zh-CN.md', 'en.md'],
srcDir: 'locales',
lastUpdated: true,

head: [
[
"link",
'link',
{
type: "image/x-icon",
rel: "icon",
href: "https://pub.lbkrs.com/files/202205/xAwaQmCk1cD1AUsm/favicon.png",
type: 'image/x-icon',
rel: 'icon',
href: 'https://pub.lbkrs.com/files/202205/xAwaQmCk1cD1AUsm/favicon.png',
},
],
...siteMetadata,
Expand All @@ -43,57 +44,59 @@ export default defineConfig({
// },
// },
// },
"zh-CN": {
label: "简体中文",
lang: "zh-CN",
link: "/zh-CN/docs",
'zh-CN': {
label: '简体中文',
lang: 'zh-CN',
link: '/zh-CN/docs',
themeConfig: {
siteTitle: "帮助中心",
siteTitle: '帮助中心',
outline: 'deep',
nav: [
{ text: "首页", link: "/", target: "_self" },
{ text: "关于我们", link: "/zh-CN/about", target: "_self" },
{ text: 'Whale 首页', link: '/', target: '_self' },

{
text: "LongPort OpenAPI",
link: "https://open.longportapp.com",
text: 'OpenAPI',
link: 'https://open.longportapp.com',
},
{ text: '关于我们', link: '/zh-CN/about', target: '_self' },
],
editLink: {
pattern: editLinkPattern,
text: "编辑此页",
text: '编辑此页',
},
lastUpdated: {
text: "最后更新时间",
text: '最后更新时间',
},
docFooter: {
prev: "上一篇",
next: "下一篇",
prev: '上一篇',
next: '下一篇',
},
},
},
"zh-HK": {
label: "繁体中文",
lang: "zh-HK",
link: "/zh-HK/docs",
'zh-HK': {
label: '繁体中文',
lang: 'zh-HK',
link: '/zh-HK/docs',
themeConfig: {
siteTitle: "幫助中心",
siteTitle: '幫助中心',
nav: [
{ text: "首頁", link: "/", target: "_self" },
{ text: "關於我們", link: "/zh-HK/about", target: "_self" },
{ text: 'Whale 首頁', link: '/', target: '_self' },
{
text: "LongPort OpenAPI",
link: "https://open.longportapp.com/zh-HK",
text: 'OpenAPI',
link: 'https://open.longportapp.com/zh-HK',
},
{ text: '關於我們', link: '/zh-HK/about', target: '_self' },
],
editLink: {
pattern: editLinkPattern,
text: "编辑此页",
text: '编辑此页',
},
lastUpdated: {
text: "最後更新時間",
text: '最後更新時間',
},
docFooter: {
prev: "上一篇",
next: "下一篇",
prev: '上一篇',
next: '下一篇',
},
},
},
Expand All @@ -102,15 +105,55 @@ export default defineConfig({
// https://vitepress.dev/reference/default-theme-config
themeConfig: {
logo: "https://assets.lbkrs.com/uploads/d29e591d-0c3d-4def-b837-cd06dfb4d738/whale-logo.svg",
search: {
provider: "local",
options: {
locales: {
"zh-CN": {
translations: {
button: {
buttonText: "搜索文档",
buttonAriaLabel: "搜索文档",
},
modal: {
noResultsText: "无法找到相关结果",
resetButtonTitle: "清除查询条件",
footer: {
selectText: "选择",
navigateText: "切换",
closeText: "关闭",
},
},
},
},
"zh-HK": {
translations: {
button: {
buttonText: "搜尋文件",
buttonAriaLabel: "搜尋文件",
},
modal: {
noResultsText: "無法找到相關結果",
resetButtonTitle: "清除查詢條件",
footer: {
selectText: "選擇",
navigateText: "切換",
closeText: "關閉",
},
},
},
},
},
},
},
sidebar: {
// en: docsSidebarEN,
// "zh-CN": docsSidebarZHCN,
// "zh-HK": docsSidebarZHHK,
"zh-CN": siderbarConfig["zh-CN"],
"zh-HK": siderbarConfig["zh-HK"],
'zh-CN': siderbarConfig['zh-CN'],
'zh-HK': siderbarConfig['zh-HK'],
},
socialLinks: [
{ icon: "github", link: "https://github.com/longbridgeapp/whale-docs" },
],
outline: [2, 3],
socialLinks: [],
},
});
20 changes: 16 additions & 4 deletions .vitepress/theme/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
@tailwind components;
@tailwind utilities;

/*
.vitepress/theme/custom.css
/*
.vitepress/theme/custom.css

https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css
*/
Expand All @@ -22,7 +22,9 @@
--vp-sidebar-width: 300px;
--vp-sidebar-bg-color: #f8f9fa;

--vp-layout-max-width: 1800px;
--vp-layout-max-width: 1600px;

--vp-nav-logo-height: 32px;
}

.VPDoc .content-container {
Expand Down Expand Up @@ -50,7 +52,7 @@ ol {
.callout {
padding: 0.5em 1em;
margin: 1.5em 0;
border: 2px solid #ccc;
border: 1px solid #ccc;
border-radius: 5px;
font-size: 1em;

Expand Down Expand Up @@ -162,3 +164,13 @@ ol {
margin: 0;
line-height: 1.7;
}

.VPDoc .VPLastUpdated {
font-weight: normal;
font-size: 0.9em;
color: var(--vp-c-text-3);
}

.DocSearch-Button{
border-color: var(--vp-c-divider);
}