Skip to content

Commit 042367f

Browse files
authored
feat: pages (#8)
* feat: site config * feat: add pages
1 parent afefbac commit 042367f

File tree

10 files changed

+71
-11
lines changed

10 files changed

+71
-11
lines changed

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
**/*.ejs
44
**/*.html
55
package.json
6+
67
.umi
78
.umi-production
89
.umi-test
10+
11+
dist

config/basic.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ export default {
22
logo: '/images/cnodejs.svg',
33
title: 'CNode.js',
44
description: 'Node.js 专业中文社区',
5+
concept:
6+
'CNode 社区为国内最专业的 Node.js 开源技术社区,致力于 Node.js 的技术研究。',
57
};

config/config.ts

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,48 @@ import routes from './routes';
33
import { defineConfig } from 'umi';
44

55
export default defineConfig({
6+
// cnodejs.org
7+
favicon: '/images/favicon.ico',
8+
metas: [
9+
{
10+
name: 'keywords',
11+
content: 'nodejs, node, express, connect, socket.io',
12+
},
13+
{
14+
name: 'referrer',
15+
content: 'always',
16+
},
17+
{
18+
name: 'author',
19+
content: 'EDP@TaoBao',
20+
},
21+
{
22+
name: 'wb:webmaster',
23+
content: '617be6bd946c6b96',
24+
},
25+
{
26+
name: 'wb:webmaster',
27+
content: '617be6bd946c6b96',
28+
},
29+
],
30+
links: [
31+
{
32+
type: 'image/x-icon',
33+
rel: 'icon',
34+
href: '//static2.cnodejs.org/public/images/cnode_icon_32.png',
35+
},
36+
{
37+
title: 'RSS',
38+
type: 'application/rss+xml',
39+
rel: 'alternate',
40+
href: 'https://cnodejs.org/rss',
41+
},
42+
],
43+
44+
// umi.js
645
singular: true,
746
fastRefresh: {},
8-
// mfsu: {},
47+
mfsu: {},
948

1049
nodeModulesTransform: {
1150
type: 'none',

config/routes.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ const routes: IRoute[] = [
2626
name: '关于',
2727
component: '@/page/about',
2828
},
29+
{
30+
path: '/links',
31+
exact: true,
32+
icon: 'link',
33+
name: '友情链接',
34+
component: '@/page/links',
35+
},
2936
{
3037
path: '/api',
3138
exact: true,

public/images/cnode_icon_32.png

2.11 KB
Loading

public/images/cnode_icon_64.png

1.36 KB
Loading

src/layout/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ const Layout: React.FC<React.PropsWithChildren<Props>> = (props) => {
7777
ghost
7878
colSpan={{
7979
sm: '200px',
80-
md: '400px',
80+
md: '320px',
8181
}}
8282
>
8383
<Space size={16} direction="vertical" style={{ width: '100%' }}>

src/page/api.tsx

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/page/api/index.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import React from 'react';
2+
3+
const ApiPage: React.FC<Props> = (props) => {
4+
return <div>TODO.</div>;
5+
};
6+
7+
export default ApiPage;
8+
9+
interface Props {}

src/page/links/index.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import React from 'react';
2+
3+
const LinksPage: React.FC<Props> = (props) => {
4+
return <div>TODO.</div>;
5+
};
6+
7+
export default LinksPage;
8+
9+
interface Props {}

0 commit comments

Comments
 (0)