Skip to content

Commit

Permalink
chore: update news (#140)
Browse files Browse the repository at this point in the history
* chore: 增加百度统计

* chore: update info
  • Loading branch information
Seventysevendays authored Aug 21, 2024
1 parent 8109a22 commit a8c8726
Show file tree
Hide file tree
Showing 13 changed files with 190 additions and 130 deletions.
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
registry=https://registry.npmmirror.com/
29 changes: 17 additions & 12 deletions .umirc.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DEFAULT_LOCAL } from './src/constant';
import { defineConfig } from 'umi';
import { DEFAULT_LOCAL } from './src/constant';

export default defineConfig({
nodeModulesTransform: {
Expand Down Expand Up @@ -52,21 +52,27 @@ export default defineConfig({
],
scripts: [
`var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?e4bea71987c7daae77ee69586aad5bec";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();`,
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?e4bea71987c7daae77ee69586aad5bec";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();`,
{
src: 'https://www.googletagmanager.com/gtag/js?id=AW-11092859162',
async: true,
},
`window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'AW-11092859162');`,
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'AW-11092859162');`,
`var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?9452f06d5325a3907efec5619d9f2392";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();`,
],
theme: {
'primary-color': 'rgba(22,80,255,1)',
Expand All @@ -83,7 +89,6 @@ gtag('config', 'AW-11092859162');`,
.use('frontmatter-markdown-loader')
.loader('frontmatter-markdown-loader');
},
ssr: { mode: 'stream' },
exportStatic: {},
fastRefresh: {},
request: {
Expand Down
10 changes: 1 addition & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,12 @@
},
"devDependencies": {
"@types/react": "^17.0.0",
"@types/react-copy-to-clipboard": "^5.0.4",
"@types/react-dom": "^17.0.0",
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^5.0.0",
"@types/react-copy-to-clipboard": "^5.0.4",
"@umijs/preset-react": "1.x",
"@umijs/test": "^3.5.28",
"eslint": "^7.32.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.26.1",
"eslint-plugin-react-hooks": "^4.2.0",
"frontmatter-markdown-loader": "^3.7.0",
"lint-staged": "^10.0.7",
"prettier": "^2.2.0",
Expand Down
20 changes: 11 additions & 9 deletions src/components/Header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,16 @@ import { CloseOutlined, RightOutlined, UpOutlined } from '@ant-design/icons';
import { DocSearch } from '@docsearch/react';
import { Drawer, Menu, Popover, Space } from 'antd';
import cx from 'classnames';
import React, { useEffect, useState } from 'react';
import { useEffect, useState } from 'react';
import { useMedia } from 'react-use';
import { history, useIntl, useLocation } from 'umi';

import { DEFAULT_LOCAL, searchParamsEn, searchParamsZh } from '@/constant';
import { getSearch, goLinkAt, historyPushLinkAt } from '@/util';
import '@docsearch/css';
import AnnouncementBanner from '../AnnouncementBanner';
import GithubButton from '../githubButton';
import styles from './index.less';
import {
DEFAULT_LOCAL,
HOST_EN,
HOST_ZH,
searchParamsEn,
searchParamsZh,
} from '@/constant';
import { getSearch, goLinkAt, historyPushLinkAt } from '@/util';

export const Header = ({ isStick }: { isStick?: boolean }) => {
const intl = useIntl();
Expand Down Expand Up @@ -362,6 +356,14 @@ export const Header = ({ isStick }: { isStick?: boolean }) => {
>
{intl.formatMessage({ id: 'header.product.desc3' })}
</div>
<div
className={styles.popoverContainer}
onClick={() => {
window.open('https://osgraph.com/');
}}
>
{intl.formatMessage({ id: 'header.product.desc4' })}
</div>
</div>
<div>
<div className={styles.popoverTitle}>
Expand Down
18 changes: 2 additions & 16 deletions src/data/bannerContent.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
import { IntlShape } from 'react-intl';
export const getBannerCnContentList = (intl: IntlShape) => [
{
pcImg:
'https://mdn.alipayobjects.com/huamei_qcdryc/afts/img/A*xDDQQIeyUTEAAAAAAAAAAAAADgOBAQ/original',
mobileImg:
'https://mdn.alipayobjects.com/huamei_qcdryc/afts/img/A*bTMJT4EQmXcAAAAAAAAAAAAADgOBAQ/original',
},
];
export const getBannerEnContentList = (intl: IntlShape) => [
// {
// pcImg:
// 'https://mdn.alipayobjects.com/huamei_2dxjn8/afts/img/A*MhtgQJHk8soAAAAAAAAAAAAADrR-AQ/original',
// mobileImg:
// 'https://mdn.alipayobjects.com/huamei_2dxjn8/afts/img/A*mb5dTZkyyG8AAAAAAAAAAAAADrR-AQ/original',
// },
];
export const getBannerCnContentList = (intl: IntlShape) => [];
export const getBannerEnContentList = (intl: IntlShape) => [];
108 changes: 104 additions & 4 deletions src/data/blog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import md17 from '@/doc/zh/17.md';
import md18 from '@/doc/zh/18.md';
import md19 from '@/doc/zh/19.md';
import md20 from '@/doc/zh/20.md';
import md888 from '@/doc/zh/888.md';
import md999 from '@/doc/zh/999.md';
import idc from '@/doc/zh/IDC.md';
import md888 from '@/doc/zh/888.md';

export const blogs = [
{
Expand Down Expand Up @@ -207,7 +207,7 @@ export const blogs = [
content: md20?.html,
},
{
id: 999,
id: 20,
img: 'https://mdn.alipayobjects.com/huamei_qcdryc/afts/img/A*c41lRYAbTeYAAAAAAAAAAAAADgOBAQ/original',
title: 'ICDM 2023 大赛成绩榜单',
desc: '初赛和复赛阶段的评估函数按照 Adjusted rand score(ARI)计算。结果取历史最高分,分数榜单每天(T+1)在网站更新',
Expand All @@ -221,18 +221,118 @@ export const blogs = [
desc: 'IDC发布了最新的市场研究报告《IDC MarketScape:中国图数据库市场厂商评估,2023》。蚂蚁集团自研的企业级图数据管理平台TuGraph跻身"领导者"象限。',
type: 'news',
updateDate: '2023-07-17',
id: 1000,
id: 21,
content: idc?.html,
},
{
id: 888,
id: 22,
img: 'https://mdn.alipayobjects.com/huamei_mag6n2/afts/img/A*3teRQ5fY0H0AAAAAAAAAAAAADlT8AQ/original',
title: '活动回顾|TuGraph 社区 Meetup 北京站演讲内容,附视频和PPT',
desc: '',
updateDate: '2024-04-07',
type: 'news',
content: 'https://mp.weixin.qq.com/s/hoHSJg4mU6KWHbTEpgqFZQ',
isLink: true,
},
{
id: 23,
img: 'https://mdn.alipayobjects.com/huamei_mag6n2/afts/img/A*aQP_QL1BA3wAAAAAAAAAAAAADlT8AQ/original',
title: '陈文光:AI时代需要怎样的数据处理技术?',
desc: '',
updateDate: '2024-04-25',
type: 'news',
content: 'https://mp.weixin.qq.com/s/YXWkis0eaplKWjZGgMxsWw',
isLink: true,
},
{
id: 24,
img: 'https://mdn.alipayobjects.com/huamei_qcdryc/afts/img/A*BLo1QZwId_0AAAAAAAAAAAAADgOBAQ/original',
title: '2024 开源之夏已开启',
desc: '欢迎报名 TuGraph 项目,赢取万元奖金',
updateDate: '2024-04-30',
type: 'competition',
content: md888?.html,
},
{
id: 25,
img: 'https://mdn.alipayobjects.com/huamei_mag6n2/afts/img/A*Da84T4u5MKIAAAAAAAAAAAAADlT8AQ/original',
title: '深入解读TuGraph计算引擎模型推理系统',
desc: '',
updateDate: '2024-05-24',
type: 'tech',
content: 'https://mp.weixin.qq.com/s/X3hx_y-e7XP1VQHoeRHnDA',
isLink: true,
},
{
id: 26,
img: 'https://mdn.alipayobjects.com/huamei_mag6n2/afts/img/A*AwGQQ4LE1AwAAAAAAAAAAAAADlT8AQ/original',
title: 'Vector | Graph:蚂蚁首个开源Graph RAG框架设计解读',
desc: '',
updateDate: '2024-06-19',
type: 'tech',
content: 'https://mp.weixin.qq.com/s/WILvYFiKugroy9Q_FmGriA',
isLink: true,
},
{
id: 27,
img: 'https://mdn.alipayobjects.com/huamei_mag6n2/afts/img/A*xlLgSJa49JoAAAAAAAAAAAAADlT8AQ/original',
title: '技术圈 i 人是如何交朋友的?有人尝试用技术解决这个问题',
desc: '',
updateDate: '2024-07-01',
type: 'news',
content: 'https://mp.weixin.qq.com/s/53lpp65G7MorrS22x8WH9A',
isLink: true,
},
{
id: 28,
img: 'https://mdn.alipayobjects.com/huamei_mag6n2/afts/img/A*RpGGQLyinTwAAAAAAAAAAAAADlT8AQ/original',
title: 'TuGraph分布式图数据库上线阿里云市场',
desc: '',
updateDate: '2024-07-04',
type: 'news',
content: 'https://mp.weixin.qq.com/s/IPjeF9egDDK4RwrTp_MhIg',
isLink: true,
},
{
id: 29,
img: 'https://mdn.alipayobjects.com/huamei_mag6n2/afts/img/A*UDuIRI2Y-1EAAAAAAAAAAAAADlT8AQ/original',
title: '社区贡献 | 新Feature发布:TuGraph-DB支持空间数据类型',
desc: '',
updateDate: '2024-07-12',
type: 'tech',
content: 'https://mp.weixin.qq.com/s/YIMJGFKBJHNgC4GA1jAiPg',
isLink: true,
},
{
id: 30,
img: 'https://mdn.alipayobjects.com/huamei_mag6n2/afts/img/A*iewnT7DgxTEAAAAAAAAAAAAADlT8AQ/original',
title: '上万次模型训练,TuGraph准确预测西班牙欧洲杯决赛夺冠',
desc: '',
updateDate: '2024-07-16',
type: 'news',
content: 'https://mp.weixin.qq.com/s/NqwqP8kzeaoZQqmBBI3NRg',
isLink: true,
},
{
id: 31,
img: 'https://mdn.alipayobjects.com/huamei_mag6n2/afts/img/A*jSDxRIOCdLQAAAAAAAAAAAAADlT8AQ/original',
title: '论文解读|GRAG: Graph Retrieval-Augmented Generation',
desc: '',
updateDate: '2024-07-19',
type: 'tech',
content: 'https://mp.weixin.qq.com/s/xLVaFVr7rnYJq0WZLsFVMw',
isLink: true,
},
{
id: 32,
img: 'https://mdn.alipayobjects.com/huamei_mag6n2/afts/img/A*irZsSZVT780AAAAAAAAAAAAADlT8AQ/original',
title: '还在用Google Scholar看论文?「论文图谱」打开“上帝视角”',
desc: '',
updateDate: '2024-07-25',
type: 'tech',
content: 'https://mp.weixin.qq.com/s/jeHBn1DKyo2sTP9896ZbKA',
isLink: true,
},
];

export const getZHBlogs = (type: string) => {
Expand Down
60 changes: 10 additions & 50 deletions src/data/download.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ export const assetsList = [
{
name: 'CentOS',
assets: [
{
label: 'v4.3.2',
value:
'https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/tugraph-4.3.2/tugraph-4.3.2-1.el8.x86_64.rpm',
},
{
label: 'v4.0.1',
value:
Expand All @@ -33,36 +38,16 @@ export const assetsList = [
value:
'https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/tugraph-3.6.0/tugraph-3.6.0-1.el7.x86_64.rpm',
},
{
label: 'v3.5.1',
value:
'https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/tugraph-3.5.1/tugraph-3.5.1-1.el7.x86_64.rpm',
},
{
label: 'v3.5.0',
value:
'https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/tugraph-3.5.0/tugraph-3.5.0-1.el7.x86_64.rpm',
},
{
label: 'v3.4.0',
value:
'https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/tugraph-3.4.0/TuGraph-3.4.0-1.el7.x86_64.rpm',
},
{
label: 'v3.3.2',
value:
'https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/tugraph-3.3.2/TuGraph-3.3.2-1.el7.x86_64.rpm',
},
{
label: 'v3.3.0',
value:
'https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/tugraph-3.3.0/TuGraph-3.3.0-1.el7.x86_64.rpm',
},
],
},
{
name: 'Ubuntu',
assets: [
{
label: 'v4.3.2',
value:
'https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/tugraph-4.3.2/tugraph-4.3.2-1.x86_64.deb',
},
{
label: 'v4.0.1',
value:
Expand All @@ -78,31 +63,6 @@ export const assetsList = [
value:
'https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/tugraph-3.6.0/tugraph-3.6.0-1.x86_64.deb',
},
{
label: 'v3.5.1',
value:
'https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/tugraph-3.5.1/tugraph-3.5.1-1.x86_64.deb',
},
{
label: 'v3.5.0',
value:
'https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/tugraph-3.5.0/tugraph-3.5.0-1.x86_64.deb',
},
{
label: 'v3.4.0',
value:
'https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/tugraph-3.4.0/TuGraph-3.4.0-1.x86_64.deb',
},
{
label: 'v3.3.2',
value:
'https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/tugraph-3.3.2/TuGraph-3.3.2-1.x86_64.deb',
},
{
label: 'v3.3.0',
value:
'https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/tugraph-3.3.0/TuGraph-3.3.0-1.x86_64.deb',
},
],
},
];
Expand Down
4 changes: 2 additions & 2 deletions src/hooks/useGetENDocsInfo.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { useRequest } from 'umi';
import {
queryCategory,
queryVersions,
queryDocDetail,
queryVersions,
} from '../services/DocsENController';
import { useRequest } from 'umi';

export const useGetENDocsInfo = () => {
const { run: getCategoryList } = useRequest(queryCategory, { manual: true });
Expand Down
1 change: 1 addition & 0 deletions src/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export interface BlogItem {
updateDate: string;
content: string;
type: string;
isLink?: boolean;
}

export interface MenuItem {
Expand Down
Loading

0 comments on commit a8c8726

Please sign in to comment.