2 Star 0 Fork 0

mirrors_cocos-creator / docs-3d-1

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

Cocos 3D User Manual

Requirements

This documentation site is powered by GitBook.

You need Node.js and npm to be able to build the site.

To install gitbook:

npm install gitbook-cli -g

Install gulp and other modules:

npm install gulp -g

npm install

Install gitbook plugins:

gitbook install

Preview

To preview the doc, run the following command:

npm run preview
// or
npm run preview -- -o file1,file2...

The first command will build and launch web server to host the site. It will also enable live reload plugin, so your changes to the markdown source file will automatically triggers the rebuild of the docs.

The second command allows you to build the page that you assigned straightly. Please change the file1,file2... to your own file name, then execute preview command. And this command will help you rebuild the .bookignore file which can let you ignore the files that you didn't change when you rebuild the doc.

After generation finished, don't quit server process, run the following command in other terminal context:

gulp prune-left-bar

This will remove unused links from left bar.

Build

If you just want to build the markdown to html, use this command:

npm run build

You can also build the doc for ebook formats (PDF, ePub, mobi), please following this guide:

https://toolchain.gitbook.com/ebook.html

If you need to publish to the website, you'd better build it on Mac. If use Windows, some redundant .md file will also generated.

Content Editing

The markdown source of this book is in language specific folders /en and /zh. Language options are registered in LANGS.md file.

Index

In each language folder there is an SUMMARY.md file, which contains all the pages to build and also this file serves as a sidebar navigation list. Any markdown source file that are not listed in this index will not be build.

In this index file, just write links to each markdown file in a list. Indented list is for chapters that contains expandable subs. For example:

- [Using Editor](getting-started/basics/editor-overview.md)
	- [Assets](getting-started/basics/editor-panels/assets.md)
	- [Scene](getting-started/basics/editor-panels/scene.md)
	- [Node Tree](getting-started/basics/editor-panels/node-tree.md)

Will create a toggleable chapter title Using Editor. Once clicked all its subs will show up.

Front page

index.md at each language folder is the front page of the doc.

Page content

To change the content of each page, just edit the markdown source files. There's no specific front matter format, just make sure each page has a h1 as the title.

Customize Style and Template

To customize styles, modify zh/styles/website.css and en/styles/website.css.

To change HTML templates, change the content in zh/_layouts and en/_layouts. Check out Templating Guide for gitbook.

Contribution

If you encounters any typo or content problem please report issue in this repo. Pull requests are welcome!

Style Guide for Chinese documents

中文文档书写规范

空文件

简介

暂无描述 展开 收起
JavaScript 等 4 种语言
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/mirrors_cocos-creator/docs-3d-1.git
git@gitee.com:mirrors_cocos-creator/docs-3d-1.git
mirrors_cocos-creator
docs-3d-1
docs-3d-1
master

搜索帮助