Skip to content

Latest commit

 

History

History
executable file
·
45 lines (33 loc) · 1.39 KB

README.md

File metadata and controls

executable file
·
45 lines (33 loc) · 1.39 KB

Cocos Documentation User Manual

Contributing to these docs

We always welcome contributions to our documentation.

  • Fork our docs repo
  • en/ is for English contributions, zh/ is for 中文 contributions.
  • code blocks must be wrapped in special code to work correctly:
    • C++ only code block:
      {% codetabs name="C++", type="cpp" -%}
      auto mySprite = Sprite::create("mysprite.png", Rect(0,0,40,40));
      {%- endcodetabs %}
  • Test your changes using gitbook build and gitbook serve. Please test in a few web browsers. See Requirements.
  • Submit a pull request with your changes and we will review and merge it.

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 gitbook plugins:

gitbook install

Preview and Build

To preview the doc, run the following command in cocos2d-x-docs dictionary:

gitbook serve

This will build and launch web server to host the site. It will also enable livereload plugin so your changes to the markdown source file will automatically triggers rebuild of the docs.

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

gitbook build