Skip to content

Commit ce4b5d7

Browse files
committed
improvement: re-structure project using pagic v0.9.1
Signed-off-by: hylerrix <hylerrix@gmail.com>
1 parent 005394a commit ce4b5d7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+681
-69
lines changed

.github/workflows/gh-pages.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ jobs:
1515
curl -fsSL https://deno.land/x/install/install.sh | sh
1616
export PATH="$DENO_INSTALL/bin:$PATH"
1717
deno --version
18-
deno install --unstable --allow-env --allow-read --allow-write --allow-net -n pagic https://deno.land/x/pagic@0.7.28/mod.ts
18+
deno upgrade --version 1.3.3
19+
deno install --unstable --allow-env --allow-read --allow-write --allow-net -n pagic https://deno.land/x/pagic@0.9.1/mod.ts
1920
pagic build
2021
2122
- name: Deploy
@@ -41,7 +42,8 @@ jobs:
4142
curl -fsSL https://deno.land/x/install/install.sh | sh
4243
export PATH="$DENO_INSTALL/bin:$PATH"
4344
deno --version
44-
deno install --unstable --allow-env --allow-read --allow-write --allow-net -n pagic https://deno.land/x/pagic@0.7.28/mod.ts
45+
deno upgrade --version 1.3.3
46+
deno install --unstable --allow-env --allow-read --allow-write --allow-net -n pagic https://deno.land/x/pagic@0.9.1/mod.ts
4547
pagic build
4648
4749
- name: Deploy CN

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
public
2+
dist
23

34
# ignore third part demos
45
deno-playground

.ningowood/timeline.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
# 开发日志
22

3+
## 20200924
4+
5+
* 升级 Pagic v0.9.1 + Github Action
6+
* 重新整理骨架并填充其内容
7+
* 首页支持,二级目录支持
8+
* 彻底解决图床问题 -> 七牛云
9+
310
## 20200805
411

5-
* 修复图片外链 403 问题 - 切换为七牛云图床
12+
* 修复部分图片外链 403 问题 - 切换为七牛云图床
613

714
## 20200707
815

README.md

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Deno 钻研之术
2+
23
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
34
[![All Contributors](https://img.shields.io/badge/all_contributors-5-orange.svg?style=flat-square)](#contributors-)
45
<!-- ALL-CONTRIBUTORS-BADGE:END -->
@@ -11,10 +12,6 @@
1112
1213
Deno 钻研之术官方网站:[https://deno-tutorial.js.org](https://deno-tutorial.js.org)。基于 [Pagic](https://github.com/xcatliu/pagic) 构建。
1314

14-
**公告 1**:由于 Pagic 即将发布 v1,发布之前 API 不稳定,暂时不维护官网的更新了,Github Action 会构建失败。因此在 Pagic v1 发布之前,官网内容会停留在 2020-07-06 时间。
15-
16-
**公告 2**:由于之前写作顺序是先在语雀写完,导出 markdown 粘贴到本仓库中;从而导致图床崩溃,等 Pagic v1 发布之时,统一解决~,因此官网可能会阅读不便,可以先在这里阅读:[https://zhuanlan.zhihu.com/deno-tutorial](https://zhuanlan.zhihu.com/deno-tutorial)
17-
1815
## 目录
1916

2017
目前规划的章节目录如下。
@@ -97,10 +94,12 @@ Deno 钻研之术官方网站:[https://deno-tutorial.js.org](https://deno-tuto
9794

9895
使用 [Pagic](https://github.com/xcatliu/pagic) 构建:
9996

100-
> 请查看顶部公告,可能会编译失败。等 v1.0 发布。
101-
10297
```bash
103-
deno run --unstable --allow-read --allow-write --allow-net --allow-env https://deno.land/x/pagic@0.7.28/mod.ts build --serve --watch
98+
# Deno v1 之前的直接运行,Pagic v0.9.1 -> Deno v1.3.3
99+
$ deno run --unstable --allow-read --allow-write --allow-net --allow-env https://deno.land/x/pagic@v0.9.1/mod.ts build --serve --watch
100+
# Deno v1 后的先安装再执行(暂时跑不通)
101+
$ deno install --unstable --allow-read --allow-write --allow-net --name=pagic https://deno.land/x/pagic/mod.ts
102+
$ ~/.deno/bin/pagic build --serve --watch
104103
```
105104

106105
## 贡献者 ✨

articles/README.md

-1
This file was deleted.

articles/THANKS.md

-1
This file was deleted.

articles/rust/README.md

-1
This file was deleted.

articles/web/README.md

-1
This file was deleted.

deps.ts

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// @deno-types="https://deno.land/x/pagic@v0.9.1/src/types/react/v16.13.1/react.d.ts"
2+
import React from 'https://dev.jspm.io/react@16.13.1'
3+
4+
export { React }

mod.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { React } from './deps.ts'

pagic.config.tsx

+117-55
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22
import React from 'https://dev.jspm.io/react@16.13.1'
33

44
export default {
5-
srcDir: '.',
6-
ignore: [/\/demos\//, /\/public\//, /\/\./, /\/LICENSE/, /\/original-articles\//, /\/pagic\.config\.tsx/],
5+
srcDir: 'site',
6+
exclude: [/\/demos\//, /\/public\//, /\/\./, /\/LICENSE/, /\/original-articles\//, /\/pagic\.config\.tsx/],
77
theme: 'docs',
88
plugins: ['sidebar', 'prev_next', 'script', 'gitalk', 'ga'],
99
title: 'Deno 钻研之术',
1010
description: '循序渐进学 Deno & 先易后难补 Node & 面向未来的 Deno Web 应用开发。',
1111
github: 'https://github.com/hylerrix/deno-tutorial',
1212
head: (<link rel="icon" type="image/png" href="/favicon.png" />),
1313
nav: [
14+
{ text: '文章', link: '/articles/' },
1415
{
1516
text: '打赏一下!!',
1617
link: 'http://qiniu.ningo.cloud/hylerrix/reward-alipay.png',
@@ -22,60 +23,120 @@ export default {
2223
</>
2324
)
2425
},
25-
{ text: '官网', link: 'https://deno.land' },
26-
{ text: '资源', link: 'https://github.com/hylerrix/awesome-deno-cn' },
27-
{ text: '手册', link: 'https://nugine.github.io/deno-manual-cn' },
28-
{ text: 'deno.js.cn', link: 'https://deno.js.cn' },
29-
{ text: 'denocn.org', link: 'https://denocn.org' },
30-
{ text: 'Deno 库排行', link: 'https://yoshixmk.github.io/deno-x-ranking/' },
31-
{ text: '关于作者', link: 'https://github.com/hylerrix' },
32-
],
33-
sidebar: [
34-
'README.md',
35-
{
36-
// link: 'articles/basic/README.md',
37-
text: '基础篇',
38-
children: [
39-
'articles/basic/install-and-hello-world.md',
40-
]
41-
},
42-
{
43-
// link: 'articles/cli/README.md',
44-
text: 'CLI篇',
45-
children: [
46-
'articles/cli/deno-cli-v1-function.md',
47-
]
48-
},
49-
{
50-
// link: 'articles/ecology/README.md',
51-
text: '生态篇',
52-
children: [
53-
'articles/ecology/awesome-deno-cn.md'
54-
]
55-
},
26+
{ text: '资源', target: '_blank', link: 'https://github.com/hylerrix/awesome-deno-cn' },
27+
// { text: '官网', target: '_blank', link: 'https://deno.land' },
28+
// { text: '手册', target: '_blank', link: 'https://nugine.github.io/deno-manual-cn' },
29+
// { text: '中文社区 1', target: '_blank', link: 'https://deno.js.cn' },
30+
// { text: '中文社区 2', target: '_blank', link: 'https://denocn.org' },
31+
// { text: 'Deno 库排行', target: '_blank', link: 'https://yoshixmk.github.io/deno-x-ranking' },
32+
{ text: '镜像', target: '_blank', link: 'http://tutorial.deno.js.cn' },
33+
{ text: '持续添加中...', target: '_blank', link: 'https://github.com/hylerrix' },
5634
{
57-
// link: 'articles/node/README.md',
58-
text: 'Node 篇',
59-
children: [
60-
'articles/node/create-react-app-intro.md',
61-
'articles/node/javascript-toolchain-rome.md',
62-
]
63-
},
64-
{
65-
// link: 'translations/README.md',
66-
text: '翻译篇',
67-
children: [
68-
'translations/the-deno-handbook.md',
69-
'translations/deno-chat-app.md',
70-
'translations/from-node-to-deno.md',
71-
'translations/deno-oak-todo-api.md',
72-
'translations/deno-oak-mysql.md',
73-
]
35+
text: '凝果屋',
36+
link: 'https://github.com/ningowood',
37+
target: '_blank',
38+
popover: (
39+
<img src="http://qiniu.ningo.cloud/ningo/official-qrcode.png" width="256" style={{ verticalAlign: 'top' }} />
40+
)
7441
},
75-
{
76-
text: '感谢', link: 'articles/THANKS.md',
77-
}
42+
{ text: '关于', target: '_blank', link: 'https://github.com/hylerrix' },
7843
],
44+
sidebar: {
45+
'/articles/': [
46+
'articles/README.md',
47+
{
48+
link: 'articles/document/README.md',
49+
title: '文档篇',
50+
children: [
51+
'articles/document/deno-version-handbook.md',
52+
'articles/document/deno-cli-handbook.md',
53+
],
54+
},
55+
{
56+
link: 'articles/basic/README.md',
57+
title: '基础篇',
58+
children: [
59+
'articles/basic/install-and-hello-world.md',
60+
],
61+
},
62+
{
63+
link: 'articles/architecture/README.md',
64+
title: '架构篇',
65+
children: [
66+
{
67+
link: 'articles/architecture/cli/README.md',
68+
title: '探索 CLI',
69+
children: [
70+
'articles/architecture/cli/deno-cli-v1-function.md'
71+
],
72+
},
73+
],
74+
},
75+
// {
76+
// link: 'articles/frontend/README.md',
77+
// title: '前端篇',
78+
// children: [],
79+
// },
80+
// {
81+
// link: 'articles/backend/README.md',
82+
// title: '后端篇',
83+
// children: [],
84+
// },
85+
{
86+
link: 'articles/ecology/README.md',
87+
title: '生态篇',
88+
children: [
89+
'articles/ecology/awesome-deno-cn.md'
90+
],
91+
},
92+
// {
93+
// link: 'articles/language/README.md',
94+
// title: '语言篇',
95+
// children: [],
96+
// },
97+
{
98+
link: 'articles/node/README.md',
99+
title: 'Node 篇',
100+
children: [
101+
'articles/node/create-react-app-intro.md',
102+
'articles/node/javascript-toolchain-rome.md',
103+
],
104+
},
105+
{
106+
link: 'articles/translation/README.md',
107+
title: '翻译篇',
108+
children: [
109+
'articles/translation/the-deno-handbook.md',
110+
'articles/translation/deno-chat-app.md',
111+
'articles/translation/from-node-to-deno.md',
112+
'articles/translation/deno-oak-todo-api.md',
113+
'articles/translation/deno-oak-mysql.md',
114+
],
115+
},
116+
// {
117+
// link: 'articles/forward/README.md',
118+
// title: '转载篇',
119+
// children: [],
120+
// },
121+
// {
122+
// link: 'articles/weekly/README.md',
123+
// title: '周报篇',
124+
// children: [],
125+
// },
126+
{
127+
link: 'articles/ROADMAP.md',
128+
title: '未来规划',
129+
children: [
130+
'articles/frontend/README.md', // 前端篇
131+
'articles/backend/README.md', // 后端篇
132+
'articles/language/README.md', // 语言篇
133+
'articles/forward/README.md', // 转载篇
134+
'articles/weekly/README.md', // 周报篇
135+
],
136+
},
137+
'articles/THANKS.md',
138+
],
139+
},
79140
tools: {
80141
editOnGithub: true,
81142
backToTop: true
@@ -89,6 +150,7 @@ export default {
89150
pagerDirection: 'first'
90151
},
91152
ga: {
92-
id: window.Deno?.env.get('GA_ID') ?? 'UA-169223577-1'
93-
}
153+
id: 'UA-169223577-1'
154+
},
155+
port: 8011
94156
}

0 commit comments

Comments
 (0)