File tree 8 files changed +19
-7
lines changed
8 files changed +19
-7
lines changed Original file line number Diff line number Diff line change 53
53
图雀起源于传统的技术博客,但是却致力于解决一些根本性的问题:
54
54
55
55
- 传统博文的书写具有很大的随意性,导致文章质量差异很大,而图雀试图用一种统一的模式去书写教程(查看[ 开始书写教程] ( ./start-writing.md ) )——即基于一个真实的 Git 仓库的提交记录构成教程,确保每一篇教程的可实践性
56
- - 优质的技术博客散落在互联网的各个角落,很难“一网打尽”,而图雀试图提供一个汇聚优质博文和作者的平台 ,让学习者不必再苦苦寻找
57
- - 传统博客的互动非常有限(一般都只有文后评论),而图雀试图提供一个方便且强大的社区功能,让作者和读者的沟通交流更加方便
56
+ - 优质的技术博客散落在互联网的各个角落,很难“一网打尽”,而 [ 图雀试图 ] ( https://tuture.co/ ) 提供一个汇聚优质博文和作者的平台 ,让学习者不必再苦苦寻找
57
+ - 传统博客的互动非常有限(一般都只有文后评论),而图雀试图提供一个方便且强大的社区功能:1)每篇教程都会标明作者和其撰写教程的 Github 仓管,使得读者可以以 [ Github Issue ] ( https://github.com/tuture-dev/comments/issues ) 的方式和作者直接交流改进教程内容;2)我们同时开通了 [ Gitter ] ( https://gitter.im/tuture-dev/tuture ) 交流频道,使得作者和读者可以更加实时的交流想法,沉淀知识
58
58
59
59
## 写作体验的革命
60
60
Original file line number Diff line number Diff line change @@ -30,9 +30,10 @@ $ git submodule add <repo_git_url> tutorials/<repo_name>
30
30
31
31
``` bash
32
32
$ npm install
33
- $ npm run buildTutorials
33
+ $ npm run build:tutorials
34
34
$ npm start
35
35
```
36
+
36
37
:::
37
38
38
39
4 . 提交修改并上传:
@@ -63,12 +64,12 @@ $ tuture build
63
64
64
65
### 涉及有图片资源的情形
65
66
66
- 如果您的教程中有图片资源,图雀会将默认的图片文件夹(即 tuture-assets)整个复制到构建的 Markdown 文档同一目录下。如果您想要自定义的路径前缀,build 命令提供了一个参数 ` --assetsPath ` 用于替换所有图片资源的路径前缀,并且所有图片会放入到 。
67
+ 如果您的教程中有图片资源,图雀会将默认的图片文件夹(即 tuture-assets)整个复制到构建的 Markdown 文档同一目录下。如果您想要自定义的路径前缀,build 命令提供了一个参数 ` --assetsPath ` 用于替换所有图片资源的路径前缀,并且所有图片会放入到这个路径里面 。
67
68
68
69
例如,原先教程中图片的 Markdown 代码可能是 `![ ] ( tuture-assets/img.png ) ,那么通过运行以下命令:
69
70
70
71
``` bash
71
72
$ tuture build --assetsPath=images
72
73
```
73
74
74
- 对应的图片代码就会替换成 `  ` 。
75
+ 对应的图片代码就会替换成 `  ` 。
Original file line number Diff line number Diff line change @@ -31,7 +31,10 @@ Windows 用户请在 Git 附带的 **Git Bash** 中运行所有命令。
31
31
``` bash
32
32
$ tuture init
33
33
? Tutorial Name 用 HTML 和 CSS 写简单的静态页面
34
+ ? Description
34
35
? Topics HTML,CSS
36
+ ? Categories
37
+ info Inferred github repository: https://github.com/pftom/my-awesome-tutorial. Feel free to revise or delete it.
35
38
info .gitignore file created.
36
39
info Git post-commit hook added.
37
40
success Tuture tutorial has been initialized!
@@ -56,7 +59,10 @@ success Tuture tutorial has been initialized!
56
59
- ` .gitignore ` ,这个文件大家都很熟悉了。Tuture 自动添加了忽略 ` .tuture ` 目录的规则,这里我们再添加一些 Node 项目的规则:
57
60
58
61
```
62
+ # Tuture-related files
63
+
59
64
.tuture
65
+ tuture-build
60
66
node_modules
61
67
```
62
68
@@ -66,12 +72,17 @@ success Tuture tutorial has been initialized!
66
72
67
73
``` yaml
68
74
name : 用 HTML 和 CSS 写简单的静态页面
75
+ description : ' '
69
76
topics :
70
77
- HTML
71
78
- CSS
79
+ created : 2019-12-14T08:10:45.855Z
80
+ updated : 2019-12-14T08:10:45.855Z
72
81
steps : []
82
+ id : 29cb98ae3ed81bdcb988968cd4f79f8f
83
+ github : " https://github.com/pftom/my-awesome-tutorial"
73
84
` ` `
74
-
85
+
75
86
::: tip 提示
76
87
参考 [tuture.yml 详细说明](/reference/tuture-yml-spec.md)以了解所有字段的含义。如果你对 YAML 语法不太熟悉也没有关系,因为实际写教程的时候我们基本上不需要编辑此文件。
77
88
:::
@@ -179,7 +190,7 @@ $ git commit -m "添加 CSS 样式表"
179
190
180
191

181
192
182
- 点击 Markdown 编辑器的预览按钮,就能看到我们刚才插入的图片了 !
193
+ 可以看到 Markdown 编辑器右边的预览展示了我们插入的图片 !
183
194
184
195

185
196
You can’t perform that action at this time.
0 commit comments