From da10fdae2ffd9da216187bfefc6046004bb2433f Mon Sep 17 00:00:00 2001 From: Suyi Date: Tue, 4 Jan 2022 21:27:32 +0800 Subject: [PATCH 1/2] feat: site config --- .prettierignore | 3 +++ config/basic.ts | 2 ++ config/config.ts | 41 +++++++++++++++++++++++++++++++- public/images/cnode_icon_32.png | Bin 0 -> 2156 bytes public/images/cnode_icon_64.png | Bin 0 -> 1388 bytes 5 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 public/images/cnode_icon_32.png create mode 100644 public/images/cnode_icon_64.png diff --git a/.prettierignore b/.prettierignore index 0d4222f..35cf785 100644 --- a/.prettierignore +++ b/.prettierignore @@ -3,6 +3,9 @@ **/*.ejs **/*.html package.json + .umi .umi-production .umi-test + +dist diff --git a/config/basic.ts b/config/basic.ts index 763c7bf..a770d9d 100644 --- a/config/basic.ts +++ b/config/basic.ts @@ -2,4 +2,6 @@ export default { logo: '/images/cnodejs.svg', title: 'CNode.js', description: 'Node.js 专业中文社区', + concept: + 'CNode 社区为国内最专业的 Node.js 开源技术社区,致力于 Node.js 的技术研究。', }; diff --git a/config/config.ts b/config/config.ts index 77ed2d8..72df7e2 100644 --- a/config/config.ts +++ b/config/config.ts @@ -3,9 +3,48 @@ import routes from './routes'; import { defineConfig } from 'umi'; export default defineConfig({ + // cnodejs.org + favicon: '/images/favicon.ico', + metas: [ + { + name: 'keywords', + content: 'nodejs, node, express, connect, socket.io', + }, + { + name: 'referrer', + content: 'always', + }, + { + name: 'author', + content: 'EDP@TaoBao', + }, + { + name: 'wb:webmaster', + content: '617be6bd946c6b96', + }, + { + name: 'wb:webmaster', + content: '617be6bd946c6b96', + }, + ], + links: [ + { + type: 'image/x-icon', + rel: 'icon', + href: '//static2.cnodejs.org/public/images/cnode_icon_32.png', + }, + { + title: 'RSS', + type: 'application/rss+xml', + rel: 'alternate', + href: 'https://cnodejs.org/rss', + }, + ], + + // umi.js singular: true, fastRefresh: {}, - // mfsu: {}, + mfsu: {}, nodeModulesTransform: { type: 'none', diff --git a/public/images/cnode_icon_32.png b/public/images/cnode_icon_32.png new file mode 100644 index 0000000000000000000000000000000000000000..9e69485a35ddb9d3035a730a2610d00dc5b64215 GIT binary patch literal 2156 zcmaJ?dsGuw9v(mec_;<8i$d!V)CPehLlQ$$0t5mWB|tF>f~)2+Bmt5MNgxs%OqTmB8f+9tY+1AvK(m=mRpVu#T9hy=$qU~nlC8OjC#Z{HLdmmd!+K^`m=OX--=ON|&%ETCf| z$!r2!766OHtJQLNojR1mSI6_I0*tQ@=$%4C1thSN3#LdCqzYOJ9rIq7hVBi=cntU+ zqKv0w{tPOL9S#N{au_7z$R2zGL;@*P97KjlUXVNJNq~rW0uc`pJs?jSfl7nO;D-l; zdXo!cX%Wnz557=~ju9!9G8!JQQmJq%A`X!Y@eq|t#S=X7o}L~k!b7o5s^q44NEI$~ z3QSnRmy2aeF(L&Gid-I&q@-ieNdHVhBKs&SReUHDS}=SHSB8gh1Vc)5KsNjTLnV@r zXoWHY{wv=9DXidZlfn21Sb-$T`Do)}T@0>dv;aBGRU&c@f+WmUF92s+{8r{^C+U$u-P^M2321!g6skEC`Y#67YS_H1VfnS@lW14_v{g zW1)PKi${aO8#?=6ot`^F$H%b!IJcTk*YNcBoo0O4X;` ze0^woTQ|nL!$oFgZSCxD)l4{cp|a}KL{IacQnN)l(USF&o_kf+vpY43%p+ykY*A80 z+Rt&#Zt`8j<{gTNu>&=C_nWzv_odYm$G&Vn?fyL3mjT?3i$H$dFde?;MPQy@M=iQE zp$!(nry)*~_cI44?TzX|{DLB?&>Lhf0O5V4|nRo8hxY>chrBKN;jZJPX zrgzuCWuN4}jbW!8f0?GF|3l)r&=|ZVKWz4W)QVyirIz$4Awll6Q~L-qmKl)>3I>K3 z>Y(h0eTxtGZ_a@!JL1JVNB$MPZf250n5>BR9HX}+)&a6j8PS!Qxau3X_t;^gpY68X z7&oLL#YpDQ_B7v?x5>z8tI7ux z@%gd!nb|zY%aLArF1odDCPy3dYdy!|jw$z^+x+P`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esRLD#U{cHqG%9~c%Da{SeFU&Q0&aJL$ zWJ3S!^SSzk8hv7#vy01sjMTyx^FP!VW*Zl3?#nEF#ruW-(rv2s!w}^3*`RHbvjgR1 z8L4+?|2*#p*aiTMfuBjvZd67Jqd&Ra56BCE2nGN`owGB|JabSpU8@_*Dgc)$E?u76 zgSU*JfS(V6uT<`uWTYU3=1$H05$_B8Oi~sy2j~q; z0|17}&g(@Q9G3-|=QQ6KWdZ;dDEeCglnZ4NKacZ^|E&OkoesYiA^fW_MNS|2Y?LN` zu9IgK01zb0>FX3QeU`@0buz32fWl6eO@7yy`bf)KruB23+}r>_p{5}&Y!@%H`gy!B z@qg|BpukZKpbe$VSXY(@BK?ca{g3s5LWSN;!ry^|}DY`t~>0000 Date: Tue, 4 Jan 2022 21:28:14 +0800 Subject: [PATCH 2/2] feat: add pages --- config/routes.ts | 7 +++++++ src/layout/index.tsx | 2 +- src/page/api.tsx | 9 --------- src/page/api/index.tsx | 9 +++++++++ src/page/links/index.tsx | 9 +++++++++ 5 files changed, 26 insertions(+), 10 deletions(-) delete mode 100644 src/page/api.tsx create mode 100644 src/page/api/index.tsx create mode 100644 src/page/links/index.tsx diff --git a/config/routes.ts b/config/routes.ts index e8f0dea..0517713 100644 --- a/config/routes.ts +++ b/config/routes.ts @@ -26,6 +26,13 @@ const routes: IRoute[] = [ name: '关于', component: '@/page/about', }, + { + path: '/links', + exact: true, + icon: 'link', + name: '友情链接', + component: '@/page/links', + }, { path: '/api', exact: true, diff --git a/src/layout/index.tsx b/src/layout/index.tsx index 944cf3d..50eb1d5 100644 --- a/src/layout/index.tsx +++ b/src/layout/index.tsx @@ -77,7 +77,7 @@ const Layout: React.FC> = (props) => { ghost colSpan={{ sm: '200px', - md: '400px', + md: '320px', }} > diff --git a/src/page/api.tsx b/src/page/api.tsx deleted file mode 100644 index 9108333..0000000 --- a/src/page/api.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react'; - -const API: React.FC = (props) => { - return
api
; -}; - -export default API; - -interface Props {} diff --git a/src/page/api/index.tsx b/src/page/api/index.tsx new file mode 100644 index 0000000..64527a0 --- /dev/null +++ b/src/page/api/index.tsx @@ -0,0 +1,9 @@ +import React from 'react'; + +const ApiPage: React.FC = (props) => { + return
TODO.
; +}; + +export default ApiPage; + +interface Props {} diff --git a/src/page/links/index.tsx b/src/page/links/index.tsx new file mode 100644 index 0000000..cd57bbb --- /dev/null +++ b/src/page/links/index.tsx @@ -0,0 +1,9 @@ +import React from 'react'; + +const LinksPage: React.FC = (props) => { + return
TODO.
; +}; + +export default LinksPage; + +interface Props {}