Skip to content

Commit

Permalink
feat: update tugraph theme
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongyunWan committed Oct 16, 2024
1 parent 06460f8 commit d2d8390
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 50 deletions.
51 changes: 12 additions & 39 deletions docusaurus/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ 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 /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/tugraph-db/',

// 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',
Expand Down Expand Up @@ -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',
},
Expand All @@ -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',
},
],
},
Expand Down
14 changes: 7 additions & 7 deletions docusaurus/src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
5 changes: 5 additions & 0 deletions docusaurus/src/pages/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@
align-items: center;
justify-content: center;
}

.getStartedBtn {
background-color: #1650ff;
color: #fff !important;
}
9 changes: 5 additions & 4 deletions docusaurus/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,18 @@ import styles from './index.module.css';
function HomepageHeader() {
const {siteConfig} = useDocusaurusContext();
return (
<header className={clsx('hero hero--primary', styles.heroBanner)}>
<header className={clsx('hero', styles.heroBanner)}>
<div className="container">
<Heading as="h1" className="hero__title">
{siteConfig.title}
</Heading>
<p className="hero__subtitle">{siteConfig.tagline}</p>
<div className={styles.buttons}>
<Link
className="button button--secondary button--lg"
to="/docs/intro">
Docusaurus Tutorial - 5min ⏱️
className={clsx("button button--secondary button--lg", styles.getStartedBtn)}
to="/zh/guide"
>
Get Started
</Link>
</div>
</div>
Expand Down

0 comments on commit d2d8390

Please sign in to comment.