Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: guide toc #55

Merged
merged 1 commit into from
Aug 24, 2016
Merged

feat: guide toc #55

merged 1 commit into from
Aug 24, 2016

Conversation

atian25
Copy link
Member

@atian25 atian25 commented Aug 23, 2016

对文档的目录重新梳理了下, 大家看看. cc @eggjs/core

另外, 还有个比较纠结的地方:

  • 之前内网层讨论过, WEB 规范 和 使用文档 有点重叠, 要看看怎么处理. @mattma
  • 前者应该需要再抽象一点, 干掉一些细节, 变为一个 Web Spec
  • 后者是 egg 对 Web Spec 的理解和实现后的使用文档.

- app/extend/agent.js
- app.js
- agent.js
* Customization Guide
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里想表达的是一种最佳实践, 渐进式的代码抽离思路.

@popomore
Copy link
Member

要区分英文和中文?在两个目录下都放个 summary

* Service
* Config
* Middleware
* Context
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这堆合并到 extend 吧?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里不是扩展的意思, 而是介绍他们的 API

@atian25
Copy link
Member Author

atian25 commented Aug 24, 2016

重新更新了目录, 以及对应的文件说明, 大家再看看.

@@ -0,0 +1 @@
安全很重要, 文档目录上需要有这个, 但是否需要有这个实体文件要看看具体写的时候, 是外链去 egg-security 还是怎么样
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

尽量外链过去吧,比较跟随代码的文档会更加及时。

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好, 那文件不用存在, 但 summary 那里目录树最好独立一个项, 显眼一点, 而不是混在 plugin 的内置插件表格里面

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cookie 和 session 这类的要加在目录树上么

@fengmk2
Copy link
Member

fengmk2 commented Aug 24, 2016

文档不按语言来分子目录吧,按之前的约定好了

  • docs/SUMMARY.md
  • docs/SUMMARY.zh-CN.md

- Cluster Management
- Loader
- Security

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

空行去掉

@popomore
Copy link
Member

每个路径都带语言,外链写起来麻烦

@mattma
Copy link
Contributor

mattma commented Aug 24, 2016

@atian25

Here is two cents. I do agree that we need to separate the docs into its own structure instead of one giant page including everything that you could possible think of. To be able to get there, we need to have a solid Chinese version first.

The current commit has all files stored in docs/en folder. All of the contents are written in Chinese. Let us rename the folder name to docs/zh_CN. What do you think?

I do like the bullet points for each file, it is simple and clear. How does it relate to the current web.md and web.zh_CN.md? Are you going to copy and paste each part into the individual files? If you do, please, do it in both EN and ZH_CN version, and then delete both web*.md. So that we have a central resource to manage instead of two different places.

Once you are in the good stage, you should merge this PR into the master. Then we can start two different PRs to target two different languages. I suggest to have a perfect story and solid explanation for Chinese version. Then I can have a better understanding of story, and come up with better docs for EN.

Those are just my 2 cents. Let me know what you think.

@atian25
Copy link
Member Author

atian25 commented Aug 24, 2016

@mattma

  • 放在 en 是因为我想直接写英文版
  • web.md 这个正是我在顶部纠结的地方
    • 在开发 egg 之前, 我们首先提出了 web.md 这个规范,然后 egg 去实现它.
    • 在这个过程中, web.md 会得到一些修正
    • 我目前有点担心 web.md 是否有点太具体了, 涉及到实现细节
  • 我目前的想法是:
    • 所有文档拆分写到 egg 文档
    • 直接抛弃 web.md 或者 web.md 提炼成更精炼的 web 规范? (2选1)

@mattma
Copy link
Contributor

mattma commented Aug 24, 2016

When I reviewed web.md en version, I got the ideas based on the original chinese written. Some of the concept is not clear and I did not understand fully. I think the current web.md need some work anyway.

It is good to separate them into individual standard. It is a trend. I saw that we have Gitbook script written in the project and ready to spit out the documentation in the pretty book format based on markdown files. It makes sense to do so.

JSConf is sept 3-4. Are we still targeting to open source the project on stage? If so, we should get the effort started and have the doc ready by then.

In short, let us get rid of web.md entirely. Go with the mini-docs style. Finalize the chinese version and draft english version, and then I can take over to do the final review. What do you think?

@mattma
Copy link
Contributor

mattma commented Aug 24, 2016

@atian25 Do write it based on the web.md, do not let the work waste it. Take the best part from it, and share what you really want to the users. If you could have a few animated Gifs, that is even better.

@mattma
Copy link
Contributor

mattma commented Aug 24, 2016

For this PR, @atian25 should get it reviewed with @fengmk2 , @popomore , and @dead-horse. Locked down all the bullet points and file structure.

So that we have a solid foundation to build upon. Then we expand to have more contents for each bullet point.

- Service
- Config
- Middleware
- Context
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

context, application, request, response 放到最前面?突出这些是和 koa 一致的

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里可以加上 schedule

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

schedule , security, cookie , session 这些都是内置的插件, 我在考虑:

  • 目录树上可以加上它们, 但是点击进去都是同一个页面
  • 这个页面里面就一个简单的表格: 插件, 一句话介绍, 仓库链接

@fengmk2
Copy link
Member

fengmk2 commented Aug 24, 2016

In short, let us get rid of web.md entirely. Go with the mini-docs style. Finalize the chinese version and draft english version, and then I can take over to do the final review. What do you think?

Agree!

@atian25 web.md 更多的是写明一些约定会比较好,不应该大改它了。

- Application
- Request
- Response
- Locals
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Locals 和 Form 直观上不属于 basic usage? Helper 是不是放到 View 的里面?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Helper 目前的定位, 有点怪怪, 貌似不是只给 View 用的吧, 有点 Utils 的感觉. View 那里又有个 ViewHelper 来继承 Helper

Copy link
Member Author

@atian25 atian25 Aug 24, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

locals 和 form 放到 advanced 好像也有点尴尬, 上不上下不下的. 都OK,反正对应的文件先写了, 目录位置微调都好办

@atian25
Copy link
Member Author

atian25 commented Aug 24, 2016

@fengmk2

@atian25 web.md 更多的是写明一些约定会比较好,不应该大改它了。

好, 那现在先暂时忘记 web.md, 写 egg 的文档即可.

我的想法是, web.md 是应该更精炼更通用一点的约定, 一些实现细节不要写.
等 egg 这边稳定后, 再考虑如何反哺和优化 web.md.

@atian25 atian25 changed the title feat: [WIP] guide toc feat: guide toc Aug 24, 2016
@popomore
Copy link
Member

web 改成 specification?

@atian25
Copy link
Member Author

atian25 commented Aug 24, 2016

嗯, web.md 本来就是 web specification

@popomore
Copy link
Member

usage 改成 guide?

@atian25
Copy link
Member Author

atian25 commented Aug 24, 2016

@popomore 改了, 大家看看有没有问题, 没有就合吧.

@fengmk2 先在 en 目录吧, 写完了再看怎么调整文件目录, 包括外面的那些文件我也还没删.

- Best Practice
- Progressively-enhanced
- How to write plugin
- How to write framework
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • How to write a plugin
  • How to write a framework

加个 a ,哈哈

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

先合吧~ 后面再改~ 这2个还没想好是放到 Progressively-enhanced 里面还是单独一篇, 回头我写的时候再看

@atian25 atian25 merged commit 0e14814 into master Aug 24, 2016
@atian25 atian25 deleted the guide branch August 24, 2016 10:17
@mattma
Copy link
Contributor

mattma commented Aug 25, 2016

@atian25 I have time this weekend. Ping me when you reach to a logical milestone so that I can start working on it.

@atian25
Copy link
Member Author

atian25 commented Aug 25, 2016

@mattma In the coming days I had to focus on jsconf slide, the toc is almost ready, now need some guys to split web.md & chair docs (内网) to these files.

@eggjs/core

elrrrrrrr pushed a commit to elrrrrrrr/egg that referenced this pull request Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants