From d2d8390350d858f19c422314c42355e0a55d9fb8 Mon Sep 17 00:00:00 2001 From: wanzhongyun Date: Wed, 16 Oct 2024 17:16:58 +0800 Subject: [PATCH] feat: update tugraph theme --- docusaurus/docusaurus.config.ts | 51 +++++++-------------------- docusaurus/src/css/custom.css | 14 ++++---- docusaurus/src/pages/index.module.css | 5 +++ docusaurus/src/pages/index.tsx | 9 ++--- 4 files changed, 29 insertions(+), 50 deletions(-) diff --git a/docusaurus/docusaurus.config.ts b/docusaurus/docusaurus.config.ts index 1746bd8103..194442a649 100644 --- a/docusaurus/docusaurus.config.ts +++ b/docusaurus/docusaurus.config.ts @@ -4,12 +4,12 @@ import type {Options as DocsOptions} from '@docusaurus/plugin-content-docs'; import type * as Preset from '@docusaurus/preset-classic'; const config: Config = { - title: 'My Site', - tagline: 'Dinosaurs are cool', - favicon: 'static/img/favicon.ico', + title: 'TuGraph 文档中心', + tagline: '高性能图数据库TuGraph由蚂蚁集团和清华大学共同研发,历经蚂蚁实际业务场景锤炼,在国际图数据库基准测试中获得性能第一', + favicon: 'https://mdn.alipayobjects.com/huamei_qcdryc/afts/img/A*AbamQ5lxv0IAAAAAAAAAAAAADgOBAQ/original', // Set the production url of your site here - url: 'https://your-docusaurus-site.example.com', + url: 'https://github.com/TuGraph-family/tugraph-db', // Set the // pathname under which your site is served // For GitHub pages deployment, it is often '//' baseUrl: '/tugraph-db/', @@ -17,7 +17,7 @@ const config: Config = { // GitHub pages deployment config. // If you aren't using GitHub pages, you don't need these. organizationName: 'facebook', // Usually your GitHub org/user name. - projectName: 'docusaurus', // Usually your repo name. + projectName: 'Tugraph Docs', // Usually your repo name. onBrokenLinks: 'warn', onBrokenMarkdownLinks: 'warn', @@ -60,23 +60,17 @@ const config: Config = { ], themeConfig: { - // Replace with your project's social card + // Replace with your project's social card‘ image: 'img/docusaurus-social-card.jpg', navbar: { - title: 'TuGraph', logo: { - alt: 'My Site Logo', - src: 'img/logo.svg', + alt: 'Tugraph Site Logo', + src: 'https://mdn.alipayobjects.com/huamei_qcdryc/afts/img/A*AbamQ5lxv0IAAAAAAAAAAAAADgOBAQ/original', + // href: 'https://tugraph.tech/' }, items: [ { - type: 'docSidebar', - sidebarId: 'tutorialSidebar', - position: 'left', - label: 'Tutorial', - }, - { - href: 'https://github.com/facebook/docusaurus', + href: 'https://github.com/TuGraph-family/tugraph-db', label: 'GitHub', position: 'right', }, @@ -90,37 +84,16 @@ const config: Config = { items: [ { label: 'Tutorial', - to: '/docs/intro', - }, - ], - }, - { - title: 'Community', - items: [ - { - label: 'Stack Overflow', - href: 'https://stackoverflow.com/questions/tagged/docusaurus', - }, - { - label: 'Discord', - href: 'https://discordapp.com/invite/docusaurus', - }, - { - label: 'Twitter', - href: 'https://twitter.com/docusaurus', + to: '/zh/guide', }, ], }, { title: 'More', items: [ - { - label: 'Blog', - to: '/blog', - }, { label: 'GitHub', - href: 'https://github.com/facebook/docusaurus', + href: 'https://github.com/TuGraph-family/tugraph-db', }, ], }, diff --git a/docusaurus/src/css/custom.css b/docusaurus/src/css/custom.css index 2bc6a4cfde..5f965dd4c3 100644 --- a/docusaurus/src/css/custom.css +++ b/docusaurus/src/css/custom.css @@ -6,13 +6,13 @@ /* You can override the default Infima variables here. */ :root { - --ifm-color-primary: #2e8555; - --ifm-color-primary-dark: #29784c; - --ifm-color-primary-darker: #277148; - --ifm-color-primary-darkest: #205d3b; - --ifm-color-primary-light: #33925d; - --ifm-color-primary-lighter: #359962; - --ifm-color-primary-lightest: #3cad6e; + --ifm-color-primary: #1650ff; + --ifm-color-primary-dark: #003ef9; + --ifm-color-primary-darker: #003beb; + --ifm-color-primary-darkest: #0030c2; + --ifm-color-primary-light: #3265ff; + --ifm-color-primary-lighter: #406fff; + --ifm-color-primary-lightest: #698eff; --ifm-code-font-size: 95%; --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1); } diff --git a/docusaurus/src/pages/index.module.css b/docusaurus/src/pages/index.module.css index 9f71a5da77..ce4c5578c0 100644 --- a/docusaurus/src/pages/index.module.css +++ b/docusaurus/src/pages/index.module.css @@ -21,3 +21,8 @@ align-items: center; justify-content: center; } + +.getStartedBtn { + background-color: #1650ff; + color: #fff !important; +} diff --git a/docusaurus/src/pages/index.tsx b/docusaurus/src/pages/index.tsx index 400a3e19a8..d63cd7e4f2 100644 --- a/docusaurus/src/pages/index.tsx +++ b/docusaurus/src/pages/index.tsx @@ -10,7 +10,7 @@ import styles from './index.module.css'; function HomepageHeader() { const {siteConfig} = useDocusaurusContext(); return ( -
+
{siteConfig.title} @@ -18,9 +18,10 @@ function HomepageHeader() {

{siteConfig.tagline}

- Docusaurus Tutorial - 5min ⏱️ + className={clsx("button button--secondary button--lg", styles.getStartedBtn)} + to="/zh/guide" + > + Get Started