Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
**/*.ejs
**/*.html
package.json

.umi
.umi-production
.umi-test

dist
2 changes: 2 additions & 0 deletions config/basic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ export default {
logo: '/images/cnodejs.svg',
title: 'CNode.js',
description: 'Node.js 专业中文社区',
concept:
'CNode 社区为国内最专业的 Node.js 开源技术社区,致力于 Node.js 的技术研究。',
};
41 changes: 40 additions & 1 deletion config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
7 changes: 7 additions & 0 deletions config/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Binary file added public/images/cnode_icon_32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/cnode_icon_64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/layout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const Layout: React.FC<React.PropsWithChildren<Props>> = (props) => {
ghost
colSpan={{
sm: '200px',
md: '400px',
md: '320px',
}}
>
<Space size={16} direction="vertical" style={{ width: '100%' }}>
Expand Down
9 changes: 0 additions & 9 deletions src/page/api.tsx

This file was deleted.

9 changes: 9 additions & 0 deletions src/page/api/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from 'react';

const ApiPage: React.FC<Props> = (props) => {
return <div>TODO.</div>;
};

export default ApiPage;

interface Props {}
9 changes: 9 additions & 0 deletions src/page/links/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from 'react';

const LinksPage: React.FC<Props> = (props) => {
return <div>TODO.</div>;
};

export default LinksPage;

interface Props {}