You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ha...@apache.org on 2017/10/13 13:04:03 UTC

[08/51] [abbrv] incubator-weex-site git commit: rearrangement the structure of the document

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/32a097bf/source/guide/extend-ios.md
----------------------------------------------------------------------
diff --git a/source/guide/extend-ios.md b/source/guide/extend-ios.md
new file mode 100644
index 0000000..83a297c
--- /dev/null
+++ b/source/guide/extend-ios.md
@@ -0,0 +1,340 @@
+---
+title: Extend iOS
+type: guide
+group: Extend
+order: 6.3
+version: 2.1
+---
+
+#### Notice
+
+**All of the exported APIs in Weex are controllable and safe, they can not access private APIs or do any system hacks at runtime,  neither can they change the primary purpose of the Application**.
+
+**If you are extending your custom modules/components,  be sure NOT to export the ability of Objective-C runtime, be sure NOT to export  dynamic and uncontrolled methods such as `dlopen()`, `dlsym()`, `respondsToSelector:`, `performSelector:`, `method_exchangeImplementations()`, be sure NOT to export any private methods. **
+
+### Module extend
+
+Weex SDK provides only rendering capabilities, rather than have other capabilities, such as network, picture, and URL redirection. If you want these features, you need to implement it.
+
+For example: If you want to implement an address jumping function, you can achieve a Module following the steps below.
+
+#### Step to customize a module
+
+1. Module
+    customized must implement WXModuleProtocol
+2. A macro named `WX_EXPORT_METHOD` must be added, as it is the only way to export methods to JavaScript.
+3. The weexInstance should be synthesized. Each module object is bind to a specific instance.
+4. Module methods will be invoked in UI thread, so do not put time consuming operation there. If you want to  execute the whole module methods in other     thread, please implement the method `- (NSThread *)targetExecuteThread` in protocol. In the way, tasks distributed to this module will be executed in targetExecuteThread.
+5. Weex params can be String or Map.
+6. Module supports to return results to Javascript in callback. This callback is type of `WXModuleCallback`, the params of which can be String or Map.
+
+```objective-c
+@implementation WXEventModule
+
+@synthesize weexInstance;
+WX_EXPORT_METHOD(@selector(openURL:callback:))
+
+- (void)openURL:(NSString *)url callback:(WXModuleCallback)callback
+{
+    NSString *newURL = url;
+    if ([url hasPrefix:@"//"]) {
+        newURL = [NSString stringWithFormat:@"http:%@", url];
+    } else if (![url hasPrefix:@"http"]) {
+        newURL = [NSURL URLWithString:url relativeToURL:weexInstance.scriptURL].absoluteString;
+    }
+
+    UIViewController *controller = [[WXDemoViewController alloc] init];
+    ((WXDemoViewController *)controller).url = [NSURL URLWithString:newURL];
+
+    [[weexInstance.viewController navigationController] pushViewController:controller animated:YES];
+    callback(@{@"result":@"success"});
+}
+
+@end
+```
+
+#### export synchronous methods <span class="api-version">v0.10+</span>
+
+If you want to export synchronous methods which could make Javascript receive return values from natvie, you can use `WX_EXPORT_METHOD_SYNC`  macro.
+
+native code:
+
+```objective-c
+@implementation WXEventModule
+
+WX_EXPORT_METHOD_SYNC(@selector(getString))
+
+- (NSString *)getString
+{
+    return @"testString";
+}
+
+@end
+```
+
+js code:
+
+```javascript
+const eventModule = weex.requireModule('event')
+const returnString = syncTest.getString()  // return "testString"
+```
+
+You can alse return number/array/dictionary except string.
+
+`notice:`  the exported synchronous native method **can only be called on JS thread**. **Do not** do heavy work which will block js execution.
+
+`notice:`  Vue 2.0 has not supported this feature yet.  It will be supported in version 0.12 at the soonest.
+
+#### Register the module
+
+You can register the customized module by calling the method `registerModule:withClass` in WXSDKEngine.
+
+```objective-c
+WXSDKEngine.h
+/**
+*  @abstract Registers a module for a given name
+*  @param name The module name to register
+*  @param clazz  The module class to register
+**/
++ (void)registerModule:(NSString *)name withClass:(Class)clazz;
+
+[WXSDKEngine registerModule:@"event" withClass:[WXEventModule class]];
+```
+
+### Handler extend
+
+Weex SDK doesn't have capabilitis, such as image download 、navigator operation,please implement these protocols by yourself.
+
+#### WXImgLoaderProtocol
+<font color="gray">
+Weex SDK has no image download capability, you need to implement `WXImgLoaderProtocol`. Refer to the following examples.
+
+```objective-c
+WXImageLoaderProtocol.h
+@protocol WXImgLoaderProtocol <WXModuleProtocol>
+
+/**
+    * @abstract Creates a image download handler with a given URL
+    * @param imageUrl The URL of the image to download
+    * @param imageFrame  The frame of the image you want to set
+    * @param options : The options to be used for this download
+    * @param completedBlock : A block called once the download is completed.
+    image : the image which has been download to local.
+    error : the error which has happened in download.
+    finished : a Boolean value indicating whether download action has finished.
+    */
+    -(id<WXImageOperationProtocol>)downloadImageWithURL:(NSString *)url imageFrame:(CGRect)imageFrame userInfo:(NSDictionary *)options completed:(void(^)(UIImage *image,  NSError *error, BOOL finished))completedBlock;
+    @end
+```
+
+Implement above protocol as follows.
+
+
+```objective-c
+@implementation WXImgLoaderDefaultImpl
+#pragma mark -
+#pragma mark WXImgLoaderProtocol
+
+- (id<WXImageOperationProtocol>)downloadImageWithURL:(NSString *)url imageFrame:(CGRect)imageFrame userInfo:(NSDictionary *)userInfo completed:(void(^)(UIImage *image,  NSError *error, BOOL finished))completedBlock
+{
+    if ([url hasPrefix:@"//"]) {
+        url = [@"http:" stringByAppendingString:url];
+    }
+    return (id<WXImageOperationProtocol>)[[SDWebImageManager sharedManager] downloadImageWithURL:[NSURL URLWithString:url] options:0 progress:^(NSInteger receivedSize, NSInteger expectedSize) {
+    } completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) {
+    if (completedBlock) {
+        completedBlock(image, error, finished);
+    }
+    }];
+}
+@end
+```
+
+#### Register the handler
+
+You can register the handler which implements the protocol by calling  `registerHandler:withProtocol` in WXSDKEngine.
+
+```objective-c
+WXSDKEngine.h
+/**
+* @abstract Registers a handler for a given handler instance and specific protocol
+* @param handler The handler instance to register
+* @param protocol The protocol to confirm
+*/
++ (void)registerHandler:(id)handler withProtocol:(Protocol *)protocol;
+
+[WXSDKEngine registerHandler:[WXImgLoaderDefaultImpl new] withProtocol:@protocol(WXImgLoaderProtocol)];
+```
+
+## Custom Native Components for iOS
+
+### Component extend
+
+There are a lot of native components ready to be used in the Weex SDK,  but users always have their own use cases. You might have written an awesome native UI widget in your previous work and just want to wrap up it and export to Weex. So we provide a way to enable developers to create their own custom fully-native components.
+
+This guide will use the implementation of existing component `image` to show you how to build a native component. It will also assume that you are familiar with iOS programming.
+
+#### Registration
+
+Defining a custom native component is simple. Just call `[WXSDKEngine registerComponent:withClass:]` with the component's tag name as first argument.
+
+```objective-c
+[WXSDKEngine registerComponent:@"image" withClass:[WXImageComponent class]];
+```
+
+Then you can create a `WXImageComponent` class to represent the implementation of image component.
+
+Now you can use `<image>` wherever you want in the template.
+
+```html
+<image></image>
+```
+
+#### Adding Properties
+
+The next thing we can do is to extend some native properties to make the component more powerful. As an image, let's say we should have a `src` attribute as image's remote source and a `resize` attribute as image's resize mode(contain/cover/stretch).
+
+```objective-c
+@interface WXImageComponent ()
+
+@property (nonatomic, strong) NSString *imageSrc;
+@property (nonatomic, assign) UIViewContentMode resizeMode;
+
+@end
+```
+
+All of the styles, attributes and events will be passed to the component's initialization method, so here you can store the properties which you are interested in.
+
+```objective-c
+@implementation WXImageComponent
+
+- (instancetype)initWithRef:(NSString *)ref type:(NSString *)type styles:(NSDictionary *)styles attributes:(NSDictionary *)attributes events:(NSArray *)events weexInstance:(WXSDKInstance *)weexInstance
+{
+    if (self = [super initWithRef:ref type:type styles:styles attributes:attributes events:events weexInstance:weexInstance]) {
+        _imageSrc = [WXConvert NSString:attributes[@"src"]];
+        _resizeMode = [WXConvert UIViewContentMode:attributes[@"resize"]];
+    }
+
+    return self;
+}
+
+@end
+```
+
+The properties getted in the attributes are of `id` type, so we have to convert them to the type we want using a conversion function.  Basic conversion functions can be found in the `WXConvert` file,  or you can just add your own conversion function.
+
+
+#### Hooking Render Life Cycle
+
+A Native Component has a life cycle managed by Weex. Weex creates it, layout it, renders it and destroys it.
+
+Weex offers component life cycle hooks that give you visibility into these key moments and the ability to act when they occur.
+
+|        method        | description                              |
+| :------------------: | ---------------------------------------- |
+| initWithRef:type:... | Initializes a new component using the specified  properties. |
+|   layoutDidFinish    | Called when the component has just laid out. |
+|       loadView       | Creates the view that the component manages. |
+|     viewWillLoad     | Called before the load of component's view . |
+|     viewDidLoad      | Called after the component's view is loaded and set. |
+|    viewWillUnload    | Called just before releasing the component's view. |
+|    viewDidUnload     | Called when the component's view is released. |
+|    updateStyles:     | Called when component's style are updated. |
+|  updateAttributes:   | Called when component's attributes are updated. |
+|      addEvent:       | Called when adding an event to the component. |
+|     removeEvent:     | Called when removing an event frome the component. |
+
+
+As in the image component example, if we need to use our own image view, we can override the `loadView` method.
+
+
+```objective-c
+- (UIView *)loadView
+{
+    return [[WXImageView alloc] init];
+}
+```
+
+Now Weex will use `WXImageView` to render the `image` component.
+
+As an image component, we will need to fetch the remote image and set it to the image view.  This can be done in `viewDidLoad` method when the view is created and loaded. `viewDidLoad` is also the best time to perform additional initialization for your view, such as content mode changing.
+
+
+```objective-c
+- (void)viewDidLoad
+{
+    UIImageView *imageView = (UIImageView *)self.view;
+    imageView.contentMode = _resizeMode;
+    imageView.userInteractionEnabled = YES;
+    imageView.clipsToBounds = YES;
+    imageView.exclusiveTouch = YES;
+
+    // Do your image fetching and updating logic
+}
+```
+
+If image's remote source can be changed, you can also hook the `updateAttributes:` method to perform your attributes changing logic. Component's view always has been loaded while `updateAttributes:` or `updateStyles:` is called.
+
+
+```objective-c
+- (void)updateAttributes:(NSDictionary *)attributes
+{
+    if (attributes[@"src"]) {
+        _imageSrc = [WXConvert NSString:attributes[@"src"]];
+        // Do your image updating logic
+    }
+
+    if (attributes[@"resize"]) {
+        _resizeMode = [WXConvert UIViewContentMode:attributes[@"resize"]];
+        self.view.contentMode = _resizeMode;
+    }
+}
+```
+
+Maybe there is even more life cycle hooks you might need to consider, such as `layoutDidFinish` while layout computing is finished.  If you want to go deeper, check out the `WXComponent.h` file in the source code.
+
+Now you can use `<image>` and its attributes wherever you want in the template.
+
+```html
+<image style="your-custom-style" src="image-remote-source" resize="contain/cover/stretch"></image>
+```
+
+#### Component Method
+from WeexSDK `0.9.5`, you can define your component method by macro `WX_EXPORT_METHOD`
+for example:
+
+```
+@implementation WXMyComponent
+ +WX_EXPORT_METHOD(@selector(focus))
+ +- (instancetype)initWithRef:(NSString *)ref type:(NSString *)type styles:(NSDictionary *)styles attributes:(NSDictionary *)attributes events:(NSArray *)events weexInstance:(WXSDKInstance *)weexInstance
+ {
+     if (self = [super initWithRef:ref type:type styles:styles attributes:attributes events:events weexInstance:weexInstance]) {
+         // handle your attributes
+         // handle your styles
+     }
+
+     return self;
+ }
+
+
+ - (void)focus
+   {
+   		NSLog(@"you got it");
+   }
+@end
+```
+
+after your registration for your own custom component, now you can call it in your js file.
+
+```html
+<template>
+  <mycomponent ref='mycomponent'></mycomponent>
+</template>
+<script>
+  module.exports = {
+    created: function() {
+      this.$refs.mycomponent.focus();
+    }
+  }
+</script>
+```

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/32a097bf/source/guide/extend-js-framework.md
----------------------------------------------------------------------
diff --git a/source/guide/extend-js-framework.md b/source/guide/extend-js-framework.md
new file mode 100644
index 0000000..d7fcf6d
--- /dev/null
+++ b/source/guide/extend-js-framework.md
@@ -0,0 +1,168 @@
+---
+title: Extend JS framework
+type: guide
+group: Extend
+order: 6.4
+version: 2.1
+---
+
+# Extend JS framework
+
+This part of the extension of JS framework is still in the discussion, may be adjusted at any time, please pay attention.
+
+Weex wants to be able to respect as many developer development habits as possible.So, in addition to Weex official support Vue 2.0, the developer can also customize and horizontally extension their own or their favorite JS Framework.The steps to customize the JS Framework are as follows:
+
++ First you have a complete set of JS Framework.
++ Learn about Weex's JS engine feature support.
++ Adapting Weex's native DOM APIs.
++ Adapting Weex's initialization portal and multi-instance management mechanism.
++ Add your own JS Framework to the framework configuration of the Weex JS runtime. Then pack it.
++ Build JS bundles based on the JS Framework. You need to add a specific prefix comment so that the Weex JS runtime can recognize it.
+
+## Weex JS engine features support
+
++ Under iOS, Weex uses the JavaScriptCore that comes with the system, so the ES support depends on the version of the operating system.
+The current conservative judgments, ES5 features on the market mainstream iOS devices are perfectly supported, but some of the features of ES6 + is not supported.
+
++ Under Android, Weex uses the v8 kernel provided by UC. For performance and stability considerations, we are not using the latest version of the v8 kernel.The same conservative judgment, the ES5 feature can all support, including strict mode `Object.freeze` and so on.
+
++ The Weex JS engine does not support HTML DOM APIs and HTML5 JS APIs, including `document`, `set`Timeout`, and so on.
+
++ We added `Promise`'s polyfill, as well as the `console`'s polyfill.
+
++ In addition, in order to ensure that the JS engine can manage memory as much as possible, we have a generic global object for the `Object.freeze ()` freeze operation, which includes:
+
+ 	- `Object`
+	- `Object.prototype`
+	- `Array`
+	- `Array.prototype`
+	- `String.prototype`
+	- `Number.prototype`
+	- `Boolean.prototype`
+	- `Error.prototype`
+	- `Date.prototype`
+	- `RegExp.prototype`
+
+## Adapt to Weex's initial entry and multi-instance management mechanism
+
+The JS Framework provided by the developer needs to be packaged as a **CommonJS** package, and the package needs to be extension to the following methods:
+
+### Framework initialization
+
++ `init(config)`
+	- `config`
+		- `Document`
+		- `Element`
+		- `Comment`
+		- `TaskSender`
+		- `CallbackManager`
+
+This method places the Native DOM class and two auxiliary classes provided by Weex in the `config` parameter and allows the framework itself to be initialized.
+
+Tip: At the same time, the author can pass in a different `config` in the framework of the initialization time. This allows for framework testing or environmental simulation.
+
+#### Introduction to parameter format
+
++ `TaskSender`: wip…
++ `CallbackManager`: wip…
+
+### Register available native components and modules
+
++ `registerComponents(components)`
++ `registerModules(modules)`
+
+These two methods are called immediately after the frame is initialized. This framework will be able to know which components and modules the current client supports.
+
+#### Introduction to parameter format
+
++ `components: Array`: Describe the array of components, each of which includes:
+	+ `type: string`: Component name, for example `div`。
+	+ `methods: string[]`: Optional, a list of method names supported by this component. These methods can follow the native DOM APIs call.
++ `modules: Object`: Describe the hash table of a series of modules. Key is the module name, the value is an array. The elements of the array describe a method in the module. The information of the method includes:
+	+ `name: string`: Method name
+	+ `args: string[]`: Parameter number and type description
+
+**E.g:**
+
+```javascript
+registerComponents([
+  { type: 'web', methods: ['goBack', 'goForward', 'refresh']}
+])
+registerModules({
+  event: [
+    {name: 'openURL', args: ['string']}
+  ]
+})
+```
+
+### Multi - instance lifecycle management
+
++ `createInstance(instanceId, code, config, data, env)`
++ `refreshInstance(instanceId, data)`
++ `destroyInstance(instanceId)`
+
+Each Weex page has two stages: created and destroyed. At the same time in the Weex page running process, native can send messages to the Weex page. Different frameworks can follow their own ideas to achieve the message.
+
+#### Introduction to parameter format
+
++ `instanceId: string`: The unique id of the Weex page is generated by native.
++ `code: string`:The Wex page's JS bundle's code is passed through native.
++ `config: Object?`: The configuration information for the Wex page, such as the bundleUrl representing the bundle address, is generated by the native configuration. It has nothing to do with the contents of the JS bundle itself.
++ `data: Object?`: Native can import an external data when creating a Weex page. The JS framework can also generate different page content for the same JS bundle with different data.
++ `env: Object?`:The current environment information about the Weex page, the meaning of each field:
+	- `info: Object`: Framework information, see the "JS Bundle format requirements" later.
+	- `config: Object`:Equivalent to the third parameter of the method `config`
+	- `callbacks: CallbackManager`:  only `CallbackManager`instance of Weex page.
+	- `created: number`:The number of seconds that the Wex page was created.
+	- `framework: string`:The name of the framework used by the Wex page. Equivalent to `info.framework`.
+
+### Native communication
+
++ `receiveTasks(instanceId, tasks)`
+
+Native can use the `refreshInstance` method to send a message to the JS framework layer. But in many cases will use `receiveTasks` to send user events or methods callback to the JS framework.
+
+For example, if the user clicks on a button, native will send a `fireEvent` type of task to the JS framework, and then the JS framework will handle the corresponding event logic. This part of the working mechanism is related to the design of the `addEvent` in the native DOM interface.
+
+Another example is the user using fetch to send network requests. When the request is done at the native end, it will be sent to the JS framework with a callback type of task. Since native can not pass the function in JavaScript, it actually only sends a callbackId to the JS framework. This part of the working mechanism is related to the design of CallbackManager.
+
+#### Auxiliary method
+
++ `getRoot(instanceId): JSON`
+
+This method returns the full JSON description of the document body node. Developers can view the full native DOM tree as a result. The format of the specific return value is the same as the return method of the toJSON () method in the native DOM interface. This feature is used extensively as a developer tool extension.
+
+## Configure the JS Framework in WeexSDK
+### Prepare your JS Framework code
+
+```javascript
+// your-own-js-framework.js
+export function init (config) { ... }
+export function registerComponents (components) { ... }
+export function registerModules (modules) { ... }
+export function createInstance (id, code, config, data, env) { ... }
+export function destroyInstance (id) { ... }
+export function refreshInstance (id, data) { ... }
+export function recieveTasks (id, tasks) { ... }
+export function getRoot (id) { ... }
+```
+
+### Register a JS Framework
+
+```javascript
+import * as Vue from '...'
+import * as React from '...'
+import * as Angular from '...'
+export default { Vue, React, Angular };
+```
+And then packaged JS runtime, integrated into WeexSDK.
+
+#### JS Bundle format requirements
+
+**Framework info**
+The note(alias framework info) at the beginning of the JS Bundle file is very important. The format is as follows:
+
+```javascript
+// { "framework": "Vue" }
+```
+So that the Weex JS engine will know that the JS bundle needs to use the Vue framework to resolve.Similarly, Weex supports multiple frameworks.It will be based on js bundle notes to select the corresponding framework resolution.

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/32a097bf/source/guide/extend-web-render.md
----------------------------------------------------------------------
diff --git a/source/guide/extend-web-render.md b/source/guide/extend-web-render.md
new file mode 100644
index 0000000..7fa09ba
--- /dev/null
+++ b/source/guide/extend-web-render.md
@@ -0,0 +1,96 @@
+---
+title: Extend Web Render
+type: guide
+group: Extend
+order: 6.1
+version: 2.1
+---
+
+# Extend to HTML5
+
+Weex itself offers a lot of built-in components and modules, but also has the ability to expand horizontally. It allows developers to expand and customize themselves. But it is important to note that Weex is a cross-platform solution. When extending its built-in components or modules, you need to implement it on the three ends (Android, iOS, Web).
+
+After Weex switches the kernel to Vue 2.x, it will be easier to extend the Vue component on the Web side.
+
+## Extend Web components
+
+Vue.js is an independent front-end framework. In the browser, you can not use the Weex container for page rendering. So, the two things are the same: (1) for the Weex platform to expand Vue.js Web components. (2) directly using Vue.js to develop a Web component. The development of components can refer to its documentation: [component](https://vuejs.org/v2/guide/components.html). It is also recommended to use the ```.vue``` file to write components. How to use it: [Single file component](https://vuejs.org/v2/guide/single-file-components.html).
+
+### Example of component extension
+To extend ```<sidebar>``` as an example, you should first write the logic of the component itself:
+
+```html
+<!-- sidebar.vue -->
+<template>
+  <div class="sidebar">
+    <slot></slot>
+  </div>
+</template>
+<style scoped>
+  .sidebar {
+    /* ... */
+  }
+</style>
+<script>
+  export default {
+    props: [],
+    data () {
+      return {}
+    }
+  }
+</script>
+```
+
+And then register the ```<sidebar>``` component globally before using it:
+
+```javascript
+import Vue from 'vue'
+import Sidebar from './path/to/sidebar.vue'
+// register the ```<sidebar>``` component globally
+Vue.component('sidebar', Sidebar)
+```
+
+When you extend the Weex component, if you only use the built-in components provided by Weex and use the styles that Weex supports, it is no different from the normal custom component and does not need to be implemented at the Native side.
+
+If you find a component that does not support labels and styles that are not supported by Weex, you will need to really extend the Weex component. At the same time, you also need to extend in the Android side and the iOS side, or will lead to rendering exception.
+
+## Extend the Web module
+
+In addition to the common components, Weex also provides a common module, you can easily call the native API. In general, the registered Weex module requires three ends to be implemented, otherwise it will affect its normal use.
+
+### Register the module
+If we import the ```weex-vue-render``` library, we can get the weex variable globally. You can register the module using the ```registerModule```method.
+
+#### API format
++ `registerModule`
+
+	1.```name```: {String} Required, module name.
+	2.```define```: {Object} Required, module definition.
+
+#### The example of register module
+The following code registers a module called guide:
+
+```javascript
+weex.registerModule('guide', {
+  greeting () {
+    console.log('Hello, nice to meet you. I am your guide.')
+  },
+  farewell () {
+    console.log('Goodbye, I am always at your service.')
+  }
+})
+```
+
+### Use the module
+
+Weex provides the require method for getting registered modules. You only need to pass the module name directly:
+
+```javascript
+//import module
+const guide = weex.requireModule('guide')
+// use the methods of module
+guide.greeting()
+guide.farewell()
+```
+
+The above wording is as useful as the native end, except that the methods in the module are provided by Native.

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/32a097bf/source/guide/front-end-frameworks.md
----------------------------------------------------------------------
diff --git a/source/guide/front-end-frameworks.md b/source/guide/front-end-frameworks.md
new file mode 100644
index 0000000..3b19259
--- /dev/null
+++ b/source/guide/front-end-frameworks.md
@@ -0,0 +1,12 @@
+---
+title: Front-End Frameworks
+type: guide
+group: Overview
+order: 1.3
+version: 2.1
+has_chapter_content: true
+---
+
+## Vue.js
+
+## Rax

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/32a097bf/source/guide/index.md
----------------------------------------------------------------------
diff --git a/source/guide/index.md b/source/guide/index.md
index a7f5139..98d8060 100644
--- a/source/guide/index.md
+++ b/source/guide/index.md
@@ -1,7 +1,8 @@
 ---
-title: Get Started  
+title: Get Started
 type: guide
-order: 1
+group: Overview
+order: 1.1
 version: 2.1
 has_chapter_content: true
 ---
@@ -20,14 +21,14 @@ Weex now fully supports VueJS 2.x officailly. Weex put Vue 2.x as its built-in J
 
 ## Hello world Example
 
-The easiest way to try Weex is to use the [Playground App](../playground.html) to write a [Hello World](http://dotwe.org/vue/4d5a0471ece3daabd4681bc6d703c4c1) example at [dotWe](http://dotwe.org). No installation is required and you do not even have to write native code. 
+The easiest way to try Weex is to use the [Playground App](../playground.html) to write a [Hello World](http://dotwe.org/vue/4d5a0471ece3daabd4681bc6d703c4c1) example at [dotWe](http://dotwe.org). No installation is required and you do not even have to write native code.
 
 To test Weex online using our Playground App:
 
 - Install the [Playground App](../playground.html) on your phone.
 - Open [the Hello World example](http://dotwe.org/vue/4d5a0471ece3daabd4681bc6d703c4c1) in a new tab, click run, and then use the Playground App to scan the QR code.
 
-Nailed it! 
+Nailed it!
 
 If you took the procedure above, you can see simple HTML semantic tags, CSS styles and Javascript code. This is one of the simplest Weex examples. The demo applications renders a "Hello World" in the page. Please note that this is not a Web page. You are running native!.
 

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/32a097bf/source/guide/integrate-devtool-to-android.md
----------------------------------------------------------------------
diff --git a/source/guide/integrate-devtool-to-android.md b/source/guide/integrate-devtool-to-android.md
new file mode 100644
index 0000000..525ed7b
--- /dev/null
+++ b/source/guide/integrate-devtool-to-android.md
@@ -0,0 +1,147 @@
+---
+title: Integrate Devtool to Android
+type: guide
+group: Develop
+order: 5.4
+version: 2.1
+---
+
+# Integrate Devtool to Android
+
+Weex devtools is a custom devtools for weex that implements Chrome Debugging Protocol inspired by Stetho, it is designed to help you quickly inspect your app and debug your JS bundle source in a Chrome web page. To make it work, at first you must integrate devtool to your App. This page will help you integrate devtool to your Android App.
+
+## Integrate to Android
+
+### Installing Dependencies
+
+Weex Devtools depend on `weex_inspector`. I strongly recommend you use the latest version since both Weex SDK and devtools are developed iteratively and rapidly. See the release version list [here](https://github.com/weexteam/weex_devtools_android/releases). All the release version will publish to the [jcenter repo](https://bintray.com/alibabaweex/maven/weex_inspector). There are two choices to install it:
+
+- From Gradle
+
+  ```gradle
+  dependencies {
+    compile 'com.taobao.android:weex_inspector:0.8.0.0'
+  }
+  ```
+
+- From source code
+
+  you need to copy the dir of inspector to the same dir of your app and add `include ":inspector"`in your project's `settings.gradle` file just like playground have done, then add dependency in your app's `build.gralde`.
+
+  ```gradle
+  dependencies {
+    compile project(':inspector')
+  }
+  ```
+
+#### Version compatibility
+
+| weex sdk | weex inspector | Debugger Server |
+|----------|----------------|-----------------|
+| 0.8.0.1+ | 0.0.8.1+       | 0.2.39+         |
+| 0.7.0+   | 0.0.7.13       | 0.2.38          |
+| 0.6.0+   | 0.0.2.2        | -               |
+
+
+### Adding Debug mode switch
+
+The key to control the opening and closing of the debug mode can be summarized as three rules:
+
+**No.1: Set the switch and Debugger Server addresses via `sRemoteDebugMode` and ` sRemoteDebugProxyUrl`.**
+
+`WXEnvironment` class has a pair of static variables mark Weex current debug mode:
+
+```java
+public static boolean sRemoteDebugMode; // default close
+public static String sRemoteDebugProxyUrl; // Debugger Server addresses
+```
+
+You have to set `WXEnvironment.sRemoteDebugMode` and `WXEnvironment.sRemoteDebugProxyUrl` at the right time, for example:
+
+```java
+private void initDebugEnvironment(boolean enable, String host) {
+  WXEnvironment.sRemoteDebugMode = enable;
+  WXEnvironment.sRemoteDebugProxyUrl = "ws://" + host + ":8088/debugProxy/native";
+}
+```
+
+**No.2: You must call `WXSDKEngine.reload()` method when `sRemoteDebugMode` was changed.**
+
+You can control a state of debug mode via the `WXEnvironment.sRemoteDebugMode`, but you need reset Weex runtime if you changed a state of debug mode.
+
+```java
+private void launchInspector(boolean remoteDebug) {
+  if (WXEnvironment.isApkDebugable()) {
+    try {
+      if (mWxDebugProxy != null) {
+        mWxDebugProxy.stop();
+      }
+      HackedClass<Object> debugProxyClass = WXHack.into("com.taobao.weex.devtools.debug.DebugServerProxy");
+      mWxDebugProxy = (IWXDebugProxy) debugProxyClass.constructor(Context.class, WXBridgeManager.class)
+              .getInstance(WXEnvironment.getApplication(), WXBridgeManager.this);
+      if (mWxDebugProxy != null) {
+        mWxDebugProxy.start();
+        if (remoteDebug) {
+          mWXBridge = mWxDebugProxy.getWXBridge();
+        } else {
+          if (mWXBridge != null && !(mWXBridge instanceof WXBridge)) {
+            mWXBridge = null;
+          }
+        }
+      }
+    } catch (HackAssertionException e) {
+      WXLogUtils.e("launchInspector HackAssertionException ", e);
+    }
+  }
+}
+```
+
+In this way, You can control the debug mode flexibly.
+
+**No.3: Auto refresh page via `ACTION_DEBUG_INSTANCE_REFRESH` broadcast**
+
+`ACTION_DEBUG_INSTANCE_REFRESH` can be broadcast messages when the debug mode is switched or Chrome page refresh. You can use this mechanism to inform the current page to refresh in time.
+
+```java
+public class RefreshBroadcastReceiver extends BroadcastReceiver {
+  @Override
+  public void onReceive(Context context, Intent intent) {
+    if (IWXDebugProxy.ACTION_DEBUG_INSTANCE_REFRESH.equals(intent.getAction())) {
+      if (mUri != null) {
+        if (TextUtils.equals(mUri.getScheme(), "http") || TextUtils.equals(mUri.getScheme(), "https")) {
+          loadWXfromService(mUri.toString());
+        } else {
+          loadWXfromLocal(true);
+        }
+      }
+    }
+  }
+}
+```
+
+### Example
+
+The easiest way is reuse the code of playground. On the other hand QR code is not necessary, if you review the source code you can draw a conclusion that QR CODE is just a way to set devtools server address. There are two examples of how to open debug modes in the Playground App:
+
+- Set the debug mode via `XXXApplication`
+
+  ```java
+  public class MyApplication extends Application {
+    public void onCreate() {
+    super.onCreate();
+    initDebugEnvironment(true, "xxx.xxx.xxx.xxx"/*"DEBUG_SERVER_HOST"*/);
+    }
+  }
+  ```
+
+- Set the debug mode by scan QR code
+
+  You review the source code of playground.
+
+  - Debug mode switch control: [`WXApplication.java`](https://github.com/weexteam/weex_devtools_android/blob/master/playground/app/src/main/java/com/alibaba/weex/WXApplication.java)
+  - Refresh control [`WXPageActivity.java`](https://github.com/weexteam/weex_devtools_android/blob/master/playground/app/src/main/java/com/alibaba/weex/WXPageActivity.java)
+
+
+## Known Issues
+
+You can report issues and bugs [here](https://github.com/weexteam/weex_devtools_android/issues). We will reply as soon as possible.

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/32a097bf/source/guide/integrate-devtool-to-ios.md
----------------------------------------------------------------------
diff --git a/source/guide/integrate-devtool-to-ios.md b/source/guide/integrate-devtool-to-ios.md
new file mode 100644
index 0000000..1899092
--- /dev/null
+++ b/source/guide/integrate-devtool-to-ios.md
@@ -0,0 +1,193 @@
+---
+title: Integrate Devtool to iOS
+type: guide
+group: Develop
+order: 5.5
+version: 2.1
+---
+
+# Integrate Devtool to iOS
+
+Weex devtools is a custom devtools for weex that implements Chrome Debugging Protocol inspired by Stetho, it is designed to help you quickly inspect your app and debug your JS bundle source in a Chrome web page. To make it work, at first you must integrate devtool to your App. This page will help you integrate devtool to your iOS App.
+
+## Integrate to iOS
+
+### Installing Dependencies
+
+There are two choices to install dependencies:
+
+#### No.1 From cocoapods
+
+```
+source https://github.com/CocoaPods/Specs.git,
+pod  'WXDevtool',   '0.7.0', :configurations => ['Debug'],
+```
+
+I strongly recommend you use the latest version since both Weex SDK and devtools are developed iteratively and rapidly.
+
+#### No.2 From source code
+
+1. Get source code by [GitHub](https://github.com/weexteam/weex-devtool-iOS).
+
+2. Copy source folder to your project.
+
+  ![drag](//img.alicdn.com/tps/TB1MXjjNXXXXXXlXpXXXXXXXXXX-795-326.png)
+
+3. Choose options as the picture shows.
+
+  ![_](//img.alicdn.com/tps/TB1A518NXXXXXbZXFXXXXXXXXXX-642-154.png)
+
+### Integrate
+
+#### Step 1. Add header file in `AppDelegate.m`
+
+  - From cocoapods:
+
+    ```
+    #import <TBWXDevtool/WXDevtool.h>
+    ``
+
+  - From source code
+
+    ```
+    #import "WXDevtool.h"
+    ```
+
+#### Step 2. Initialize inspector when the APP launched
+
+You can see the WXDevtool header file as follows:
+
+```object-c
+#import <Foundation/Foundation.h>
+
+@interface WXDevTool : NSObject
+/**
+*  set debug status
+*  @param isDebug  : YES:open debug model and inspect model;
+*                    default is NO,if isDebug is NO, open inspect only;
+* */
++ (void)setDebug:(BOOL)isDebug;
+
+
+/**
+*  get debug status
+* */
++ (BOOL)isDebug;
+
+
+/**
+*  launch weex debug
+*  @param url  : ws://ip:port/debugProxy/native, ip and port is your devtool server address
+* eg:@"ws://30.30.29.242:8088/debugProxy/native"
+* */
++ (void)launchDevToolDebugWithUrl:(NSString *)url;
+
+@end
+```
+
+**Note: The inspector API must be called before weex is initialized**
+
+- `setDebug`
+
+  `setDebug` is used to control the state of debug mode, when its value is `YES`, open the debug mode, otherwise closed.
+
+- `(void)launchDevToolDebugWithUrl:(NSString *)url;`
+
+  wssip was the wss address showing in the chrome address bar.
+
+open debug model and inspector model
+
+eg:
+
+```object-c
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [WXDevTool setDebug:YES]; [WXDevTool launchDevToolDebugWithUrl:@"ws://wssip/debugProxy/native"]; }
+```
+
+open inspect model, remove the `@selector
+(setDebug:)` or add `[WXDevTool setDebug:NO]`
+
+eg:
+
+```object-c
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [WXDevTool launchDevToolDebugWithUrl:@"ws://wssip/debugProxy/native"]; }
+```
+
+#### Step 3. Auto refresh
+
+Q: Why do we need auto refresh feature?
+
+A: As shown in future, when you click the debugger button, Javascript runtime environment will change from the phone (JavaScriptCore) to PC (Chrome V8), then Weex need to re-initialize the Weex environment, re-render the page. Page rendering is required for the developer to add on its own page.
+
+![_debug](//img.alicdn.com/tps/TB1xRHhNXXXXXakXpXXXXXXXXXX-1498-668.png)
+
+Q: What kind of scene need to add refresh feature?
+
+- Click debugger button
+- Switch remoteDebug
+- Refresh inspect page
+
+Q: How to add auto refresh feature?
+
+Register events when Weex initialization.
+
+```object-c
+[[NSNotificationCenter defaultCenter] addObserver:self selector:notificationRefreshInstance: name:@"RefreshInstance" object:nil];
+```
+
+**Notes: You must cancel this event in the `dealloc` method. For example:**
+
+```
+- (void)dealloc
+{
+    [[NSNotificationCenter defaultCenter] removeObserver:self];
+}
+```
+
+For example, First you can destroy the current instance, and then re-create instance:
+
+
+```
+- (void)dealloc
+{
+    [[NSNotificationCenter defaultCenter] removeObserver:self];
+}
+```
+
+页面刷新实现,先销毁当前 instance,然后重新创建 instance,举例如下:
+
+```
+  - (void)render
+  {
+    CGFloat width = self.view.frame.size.width;
+    [_instance destroyInstance];
+    _instance = [[WXSDKInstance alloc] init];
+    _instance.viewController = self;
+    _instance.frame = CGRectMake(self.view.frame.size.width-width, 0, width, _weexHeight);
+
+    __weak typeof(self) weakSelf = self;
+    _instance.onCreate = ^(UIView *view) {
+        [weakSelf.weexView removeFromSuperview];
+        weakSelf.weexView = view;
+        [weakSelf.view addSubview:weakSelf.weexView];
+        UIAccessibilityPostNotification(UIAccessibilityScreenChangedNotification,  weakSelf.weexView);
+    };
+    _instance.onFailed = ^(NSError *error) {
+
+    };
+
+    _instance.renderFinish = ^(UIView *view) {
+        [weakSelf updateInstanceState:WeexInstanceAppear];
+    };
+
+    _instance.updateFinish = ^(UIView *view) {
+    };
+    if (!self.url) {
+        return;
+    }
+    NSURL *URL = [self testURL: [self.url absoluteString]];
+    NSString *randomURL = [NSString stringWithFormat:@"%@?random=%d",URL.absoluteString,arc4random()];
+    [_instance renderWithURL:[NSURL URLWithString:randomURL] options:@{@"bundleUrl":URL.absoluteString} data:nil];
+}
+```
+
+You can see the details in this case [WXDemoViewController.m](https://github.com/weexteam/weex-devtool-iOS/blob/master/Devtools/playground/WeexDemo/WXDemoViewController.m)

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/32a097bf/source/guide/integrate-to-your-app.md
----------------------------------------------------------------------
diff --git a/source/guide/integrate-to-your-app.md b/source/guide/integrate-to-your-app.md
index d458ac0..df92b77 100644
--- a/source/guide/integrate-to-your-app.md
+++ b/source/guide/integrate-to-your-app.md
@@ -1,34 +1,33 @@
 ---
-title: Integrate to Your App  
+title: Integrate to Your App
 type: guide
-order: 1.2
-has_chapter_content: false
-chapter_title: Intro
+group: Overview
+order: 1.3
 version: 2.1
 ---
 
 # Integrate to Your App
 
 ## Integrate to Android
-Tip:The following documents assume that you already have a certain Android development experience.    
+Tip:The following documents assume that you already have a certain Android development experience.
 
 ### Android has two ways to integrate weex
 1.using source code: Can quickly use the latest features of WEEX, according to your own characteristics of the project. So, you can do some related improvements.
 
-2.using SDK: WEEX will regularly release a stable version at jcenter.[jcenter](https://bintray.com/alibabaweex/maven/weex_sdk/view)       
+2.using SDK: WEEX will regularly release a stable version at jcenter.[jcenter](https://bintray.com/alibabaweex/maven/weex_sdk/view)
 
 ### Prerequisites
-Make sure the following configuration is complete:   
+Make sure the following configuration is complete:
 
-+ [JDK](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) version >= 1.7 , and configure the environment variable   
-+ Android SDK installed and configure the environment variable    
++ [JDK](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) version >= 1.7 , and configure the environment variable
++ Android SDK installed and configure the environment variable
 + Android SDK version 23 (compileSdkVersion in build.gradle)
 + SDK build tools version 23.0.1 (buildToolsVersion in build.gradle)
-+ Android Support Repository >= 17 (for Android Support Library)    
++ Android Support Repository >= 17 (for Android Support Library)
 
 ### Quick to use
-If you are the first time to try or have a higher demand for stability, you can use the way to dependence on the SDK.      
-The steps are as follows:       
+If you are the first time to try or have a higher demand for stability, you can use the way to dependence on the SDK.
+The steps are as follows:
 
 1. Create an Android project. There is nothing to be specified, according to your habits to.
 2. Update build.gradle by adding the following dependencies:
@@ -41,13 +40,13 @@ compile 'com.alibaba:fastjson:1.1.46.android'
 compile 'com.taobao.android:weex_sdk:0.5.1@aar'
 ```
 
-Note: the version can be high can not be low.    
+Note: the version can be high can not be low.
 
 #### Start writing code
 
-Note: There is a complete code address in the appendix    
+Note: There is a complete code address in the appendix
 
-+ Implement the picture download interface, set the initialization.   
++ Implement the picture download interface, set the initialization.
 
 ```java
 package com.weex.sample;
@@ -94,7 +93,7 @@ public class WXApplication extends Application {
 }
 ```
 
-+ Start rendering  
++ Start rendering
 
 ```java
 package com.weex.sample;
@@ -115,7 +114,7 @@ public class MainActivity extends AppCompatActivity implements IWXRenderListener
     mWXSDKInstance.registerRenderListener(this);
     /**
     * WXSample can be replaced by any string
-    * Template is  js file that .we converted 
+    * Template is  js file that .we converted
     * Option can be empty, or through the option passed js required parameters. Such as the address of the bundle js.
     * JsonInitData can be empty.
     * width is -1 , default full screen, you can customize it.
@@ -167,86 +166,86 @@ public class MainActivity extends AppCompatActivity implements IWXRenderListener
 }
 ```
 
-### Dependence on source code (IDE Android Studio)  
-1.Download source code. git clone https://github.com/alibaba/weex.    
+### Dependence on source code (IDE Android Studio)
+1.Download source code. git clone https://github.com/alibaba/weex.
 2.Create an android project.
-3.Import the SDK Module through the following path:   
-` File->New-Import Module-> chose WEEX SDK Module(weex/android/sdk) -> Finish`  
+3.Import the SDK Module through the following path:
+` File->New-Import Module-> chose WEEX SDK Module(weex/android/sdk) -> Finish`
 4.Add the following dependencies: compile project (': weex_sdk') to build.gradle file.
 5.Other settings please refer to the above "Quick to use".
 
-Appendix: [WXSample address](https://github.com/xkli/WXSample.git) `https://github.com/xkli/WXSample.git`   
+Appendix: [WXSample address](https://github.com/xkli/WXSample.git) `https://github.com/xkli/WXSample.git`
 
 
 ## Integrated to iOS
 
-Through the cocoaPods integrated Weex iOS SDK to the project.  
-First assume that you have finished installing the [iOS development environment](https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppStoreDistributionTutorial/Setup/Setup.html) and [CocoaPods](https://guides.cocoapods.org/using/getting-started.html).    
+Through the cocoaPods integrated Weex iOS SDK to the project.
+First assume that you have finished installing the [iOS development environment](https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppStoreDistributionTutorial/Setup/Setup.html) and [CocoaPods](https://guides.cocoapods.org/using/getting-started.html).
 
 ### Step 1: Add Dependencies
-Import Weex iOS SDK to your existing project, if not, you can create a new project.   
-Before proceeding, make sure that the Podfile file is under the project file. If not, create one and open with  text editor.      
+Import Weex iOS SDK to your existing project, if not, you can create a new project.
+Before proceeding, make sure that the Podfile file is under the project file. If not, create one and open with  text editor.
 
 + Integration framework
 
-WeexSDK The latest version on cocoaPods can be obtained [here](https://cocoapods.org/pods/WeexSDK) .       
-Add the following to the Podfile file:       
+WeexSDK The latest version on cocoaPods can be obtained [here](https://cocoapods.org/pods/WeexSDK) .
+Add the following to the Podfile file:
 
 ```object-c
-source 'git@github.com:CocoaPods/Specs.git' 
+source 'git@github.com:CocoaPods/Specs.git'
 target 'YourTarget' do
-    platform :ios, '7.0' 
+    platform :ios, '7.0'
     pod 'WeexSDK', '0.9.5'   ## Suggest using latest Weex SDK
-end 
+end
 ```
 
 + Integrate with source code
 
-First copy the ios / sdk directory to your existing project directory (here to copy the root directory of your existing project as an example), and then add the Podfile file. 
+First copy the ios / sdk directory to your existing project directory (here to copy the root directory of your existing project as an example), and then add the Podfile file.
 
 ```object-c
-source 'git@github.com:CocoaPods/Specs.git' 
+source 'git@github.com:CocoaPods/Specs.git'
 target 'YourTarget' do
-    platform :ios, '7.0' 
-    pod 'WeexSDK', :path=>'./sdk/' 
-end  
+    platform :ios, '7.0'
+    pod 'WeexSDK', :path=>'./sdk/'
+end
 ```
 
 ### Step 2: Install Dependencies
 
-Open the command line, switch to the directory of the Podfile file, and run the pod install command. If there are no errors, it means that the environment has been configured.   
+Open the command line, switch to the directory of the Podfile file, and run the pod install command. If there are no errors, it means that the environment has been configured.
 
-### Step 3: Initialize the Weex environment   
-In the AppDelegate.m file to do the initialization operation, usually in the didFinishLaunchingWithOptions method as follows to add.     
+### Step 3: Initialize the Weex environment
+In the AppDelegate.m file to do the initialization operation, usually in the didFinishLaunchingWithOptions method as follows to add.
 
 ```object-c
 //business configuration
 [WXAppConfiguration setAppGroup:@"AliApp"];
 [WXAppConfiguration setAppName:@"WeexDemo"];
 [WXAppConfiguration setAppVersion:@"1.0.0"];
-//init sdk environment   
+//init sdk environment
 [WXSDKEngine initSDKEnvironment];
 //register custom module and component,optional
 [WXSDKEngine registerComponent:@"MyView" withClass:[MyViewComponent class]];
 [WXSDKEngine registerModule:@"event" withClass:[WXEventModule class]];
 //register the implementation of protocol, optional
 [WXSDKEngine registerHandler:[WXNavigationDefaultImpl new] withProtocol:@protocol(WXNavigationProtocol)];
-//set the log level    
+//set the log level
 [WXLog setLogLevel: WXLogLevelAll];
 ```
 
-### Step 4: Render weex Instance   
+### Step 4: Render weex Instance
 
-Weex supports both full page rendering and partial rendering. What you need to do is render Weex's view with the specified URL and add it to its parent container. The parent container is generally a viewController.   
+Weex supports both full page rendering and partial rendering. What you need to do is render Weex's view with the specified URL and add it to its parent container. The parent container is generally a viewController.
 
 ```object-c
 #import <WeexSDK/WXSDKInstance.h>
-- (void)viewDidLoad 
+- (void)viewDidLoad
 {
     [super viewDidLoad];
     _instance = [[WXSDKInstance alloc] init];
     _instance.viewController = self;
-    _instance.frame = self.view.frame; 
+    _instance.frame = self.view.frame;
     __weak typeof(self) weakSelf = self;
     _instance.onCreate = ^(UIView *view) {
         [weakSelf.weexView removeFromSuperview];
@@ -264,10 +263,10 @@ Weex supports both full page rendering and partial rendering. What you need to d
 }
 ```
 
-WXSDKInstance is a very important class that provides a basic method and some callbacks, such as renderWithURL, onCreate, onFailed, etc., can be found in WXSDKInstance.h.     
+WXSDKInstance is a very important class that provides a basic method and some callbacks, such as renderWithURL, onCreate, onFailed, etc., can be found in WXSDKInstance.h.
 
-### Step 5: Destroy Weex Instance   
-In the dealloc phase of the viewController destroyed Weex instance, can play a role in avoiding memory leaks.   
+### Step 5: Destroy Weex Instance
+In the dealloc phase of the viewController destroyed Weex instance, can play a role in avoiding memory leaks.
 
 ```object-c
 - (void)dealloc
@@ -276,6 +275,6 @@ In the dealloc phase of the viewController destroyed Weex instance, can play a r
 }
 ```
 
-#### Import the Weex SDK framework to the project.     
-The Weex SDK can be compiled from the source code. You can try the latest feature in the new feature or bugfix branch.        
+#### Import the Weex SDK framework to the project.
+The Weex SDK can be compiled from the source code. You can try the latest feature in the new feature or bugfix branch.
 Refer to [here](https://open.taobao.com/doc2/detail?spm=a219a.7629140.0.0.tFddsV&&docType=1&articleId=104829) for direct import of weexSDK.

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/32a097bf/source/guide/intro/app-architecture.md
----------------------------------------------------------------------
diff --git a/source/guide/intro/app-architecture.md b/source/guide/intro/app-architecture.md
deleted file mode 100644
index d7b3bc6..0000000
--- a/source/guide/intro/app-architecture.md
+++ /dev/null
@@ -1,61 +0,0 @@
----
-title: Mobile App Architecture
-type: guide
-order: 4.5
-version: 2.1
----
-
-# Mobile App Architecture
-
-## Today's Mobile App
-
-Let's talk about what we think a mobile app should be.
-
-### Mobile App Needs Parallel Development
-
-Nowadays, all mobile app teams requires the ability to develop in parallel. When a mobile app keeps growing, supporting large-scale parallel development must become a very important key thing. Otherwise it's really easy to become a bottleneck.
-
-### Mobile App Needs to be Dynamic
-
-Today the development of mobile apps is very heavy. And it's really slow in iteration, release, distribution and online bugfix. The size of the package of an app is growing fast too. All of this is not suitable for this mobile internet age. Mobile app needs to be dynaimic which is out of the cumbersome process of version deployment and distribution.
-
-### Mobile App Needs Open Interconnection
-
-Today in your phone, things are hard to connect and share between different apps. They needs some container with common standard and specs to be shared with each other.
-
-## Our Thinking of Mobile App
-
-We think a dynamic, parallel development supported, standardized mobile app should be like this:
-
-```
-|------|------|------|------| |-----|
-| page | page | page | page | | api |
-|------|------|------|------| | api |
-| page | page | page | page | | api |
-|------|------|------|------| | api |
-| page | page | page | page | | api |
-|---------------------------| | api |
-|           router          | | api |
-|---------------------------| |-----|
-```
-
-* Pages: A whole mobile app should be divided into several mobile pages. Each mobile page has its own "URL".
-* Router: All the mobile pages above will be connected with router. And navigators or tab bars are just doing this job.
-* Features: All kinds of APIs or services provided from the device. Every mobile page could use these features as they like.
-
-So before you build your mobile app, make sure how many mobile pages your mobile app has and what are they. How do they connect each other. Give each mobile page a URL. And sort out all the APIs and services your mobile app needs.
-
-Then create the pages and develop, debug and deploy them using Weex.
-
-**Links**
-
-* [Mobile page architecture](./page-architecture.html)
-
-If you have built a complete mobile app already and just want to using Weex to rebuild part of these pages, that's absolutely no problem. Because Weex is just a SDK to build mobile pages which can coexist very well with other native views or hybrid pages.
-
-If the feature of WeexSDK is limited to your mobile app. You can extend your own components and modules. It requires some native development knowledge. But with our efforts on delivering more and more features, we believe this part of job will be getting smaller and smaller.
-
-**Links**
-
-* [Extend to iOS](../../references/advanced/extend-to-ios.html)
-* [Extend to Android](../../references/advanced/extend-to-android.html)

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/32a097bf/source/guide/intro/how-it-works.md
----------------------------------------------------------------------
diff --git a/source/guide/intro/how-it-works.md b/source/guide/intro/how-it-works.md
deleted file mode 100644
index f67f8b4..0000000
--- a/source/guide/intro/how-it-works.md
+++ /dev/null
@@ -1,72 +0,0 @@
----
-title: How it works  
-type: guide
-order: 4.1
-has_chapter_content: false
-chapter_title: Intro
-version: 2.1
----
-
-# How it works
-
-## Overall Structure
-
-Weex is a client-side technology on the surface, but in fact it connects the whole way from the local development environment to the cloud deployment and distribution.
-
-Developers can first write an app page just like writing a web page, and then compile the app page into a piece of JavaScript which is called Weex JS bundle.
-
-In the cloud, developers can deploy the generated JS bundle. And then it can be requested or pre-fetched from a mobile app with WeexSDK.
-
-The WeexSDK would prepare a JavaScript engine to run corresponding JS bundle when user opens a Weex page anytime. Usually the JS bundle will make some calls to native-side through Weex JS bridge. They let native-side render the user interface or handle user interactions, storage data, make network communications, call device powers and so on.
-
-Even if a user does not install the App, he can still open a same web page in the browser, using the same source code.
-
-![How it works](../images/flow.png)
-
-## Local Development Environment
-
-The design of local development environment of Weex is based on the web development experience. It help web developers writing mobile app UI with their familiar HTML / CSS / JavaScript. At the same time Weex also do the official support to [Vue.js](https://vuejs.org/), a very great front-end framework.
-
-In addition, the management of a Weex project is also very familiar with a web project. First, web developers can use npm packages to manage dependencies. Second, web developers can refer to all best practices from every process of a web project such as scaffolding, development, preview, debugging, test etc.
-
-Also same as the best practice of web development, each Weex page will be built into a JS bundle. In the browser, we put JS bundle into the web page as a `<script>` tag. In the client, we put JS bundle into the local, and execute it in WeexSDK.
-
-**Links**
-
-* [Platform differences between Weex and web](../../references/platform-difference.html)
-* [Differences of using Vue between Weex with web](../../references/vue/difference-with-web.html)
-* [Get Started](../index.html)
-* [Using Devtools](./devtools.html)
-
-## Cloud Deployment & Distribution
-
-Weex JS bundle can be deployed and distributed as a static resource. Almost all current web development system and best practice can be applied to Weex directly such as generating JS bundle through CMS system or deploying JS bundle to static CDN, monitoring JS bundle traffic through server log, caching or pre-fetching JS bundle to reduce networking cost etc.
-
-## Client-side JavaScript Engine
-
-Both iOS and Android client-side of Weex run a JavaScript engine to execute JS bundles and send well defined instructions to the native render layers. We choose JavaScriptCore in iOS and v8 in Android which provide strong performance and stability.
-
-In order to make the mobile resources better utilized, we just run only one instance of JavaScript for all Weex pages. That is, all JS bundles share the same JavaScript instance, but each JS bundle context also isolated well by default in the runtime. We also put Vue 2.0 as a built-in JS Framework, developers do not have to pack it in each JS bundle, which save the size and time of networking.
-
-## Client Rendering Layer
-
-Weex offers both iOS and Android native rendering layers. Each of them are based on the Native DOM model and exposed to JavaScript APIs. At the same time we provide a set of native components and modules to use. Also Weex has high performance especially on first-screen loading time, memory cost and re-reuse of long list, etc.
-
-Although Weex has provided a group of most commonly used components and modules officially. But we definitely know they couldn't satisfy everyone. So we design our native render as extendable as possible. You can extend more components and modules on your own. We can build and share an Weex eco-system together.
-
-**Links**
-
-* [Differences between Weex and web standard](../../references/web-standards.html)
-* [Using Weex in iOS](../../references/ios-apis.html)
-* [Using Weex in Android](../../references/android-apis.html)
-* [Extend to iOS](../../references/advanced/extend-to-ios.html)
-* [Extend to Android](../../references/advanced/extend-to-android.html)
-
-## In the Browser
-
-Besides iOS and Android client, Weex also has a web version based on Vue 2.0. Developers can just use Vue 2.0 to build the same page in browsers.
-
-**Links**
-
-* [Using Weex in HTML5](../../references/html5-apis.html)
-* [Extend to HTML5](../../references/advanced/extend-to-html5.html)

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/32a097bf/source/guide/intro/index.md
----------------------------------------------------------------------
diff --git a/source/guide/intro/index.md b/source/guide/intro/index.md
deleted file mode 100644
index 24c8236..0000000
--- a/source/guide/intro/index.md
+++ /dev/null
@@ -1,17 +0,0 @@
----
-title: Intro
-type: guide
-order: 4
-has_chapter_content: false
-chapter_title: Intro
-version: 2.1
----
-
-# Intro 
-
-- [How it works](./how-it-works.html)
-- [Web Dev Experience](./web-dev-experience.html)
-- [Using Vue](./using-vue.html)
-- [Write once, Run Everywhere](./write-once.html)
-- [App Architecture](./app-architecture.html)
-- [Weex Page Architecture](./page-architecture.html)

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/32a097bf/source/guide/intro/page-architecture.md
----------------------------------------------------------------------
diff --git a/source/guide/intro/page-architecture.md b/source/guide/intro/page-architecture.md
deleted file mode 100644
index a9d8014..0000000
--- a/source/guide/intro/page-architecture.md
+++ /dev/null
@@ -1,48 +0,0 @@
----
-title: Weex Page Architecture
-type: guide
-order: 4.6
-version: 2.1
----
-
-# Weex Page Architecture
-
-A Weex page is a independent mobile page which includes UI, interaction logic, device power, lifecycle management etc.
-
-## UI
-
-### Native DOM Model
-
-Weex page has its HTML-like DOM model to manage UI. It will be decomposed into a DOM tree which consists of some DOM nodes.
-
-**Links**
-
-* [Weex Native DOM APIs](../../references/native-dom-api.html)
-
-### Components
-
-Weex supports many kinds of components. Some of them are content components such as text, image and videos. Some of them are container components such as div, list, scroller. Also there are some special components like slider, input, textarea, and switch.
-
-**Links**
-
-* [All components Weex supports](../../references/components/index.html)
-
-### Layout System
-
-Weex use some CSS properties to layout every nodes in the DOM tree together. It includes:
-
-* Box model: Describe the `width`, `height`, `padding`, `margin` and `border` of a component node.
-* Flexbox: Describe the relations between different nodes with CSS Flexbox Spec.
-* Supportting `absolute`, `relative`, `fixed` and `sticky` value of CSS `position` property.
-
-### Features
-
-Weex supports lots of device features through modules such as storage, navigation, modals etc. Each of them exposes some JS APIs.
-
-**Links**
-
-* [All modules Weex supports](../../references/modules/index.html)
-
-### Lifecycle
-
-Every Weex page has its lifecycle which is defined and implemented in WeexSDK. All Weex pages will go through the whole process, from being created and last to being destroyed.

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/32a097bf/source/guide/intro/using-vue.md
----------------------------------------------------------------------
diff --git a/source/guide/intro/using-vue.md b/source/guide/intro/using-vue.md
deleted file mode 100644
index 56c1ca4..0000000
--- a/source/guide/intro/using-vue.md
+++ /dev/null
@@ -1,58 +0,0 @@
----
-title: Using Vue
-type: guide
-order: 4.3
-version: 2.1
----
-
-# Using Vue
-
-## Vue in Weex
-
-[Vue.js](https://vuejs.org/) is an excellent progressive JavaScript framework written by [Evan You](https://twitter.com/youyuxi) which is very easy and flexible to use. Developers can write `*.vue` files with friendly `<template>`, `<style>`, `<script>` tags to build componentized web apps.
-
-![a vue file](//cn.vuejs.org/images/vue-component.png)
-
-In Oct 2016 Vue.js launched 2.0, which includes the virtual-DOM and pre-compiler for HTML templates. This means Vue.js can run in a JS-only environment without HTML / CSS parsers. The virtual-DOM layer also makes Vue 2.x able to render native UIs through JavaScript.
-
-Weex and Vue now support each other officially. Now that Weex includes Vue 2.x as its built-in JS Framework, Vue can be used to develop native mobile apps.
-
-**Links**
-
-* [Weex tutorial](../index.html)
-* [Vue Introduction](https://vuejs.org/v2/guide/)
-* [How Weex works](./index.html)
-
-## New Features of Vue 2.x in Weex
-
-### Stream Rendering
-
-In Weex, developers can use `<foo append="tree|node">` to customize the rendering granularity to balance different UI complexity and business logic in order to get the best first-paint performance. `append=tree` means that the entire node, including all its child nodes, will be one-time rendered to native UI after all of the nodes generated completely. And `append=node` means just render the current node itself first and its child nodes will be futher rendered later.
-
-<!-- dotwe demo -->
-
-### Two-way Data Binding in Form Controls
-
-In Weex, we provide the same `v-model` directive as web dev exprience for both `<input>` and `<textarea>` components. Developers can write `<input v-model="message">` or `<textarea v-model="message">` to bind data `message` and show it on the text box automatically. When user modifies the text box, the value of data `message` will be automatically updated.
-
-<!-- dotwe demo -->
-
-### Isolate Each Page Contexts
-
-As described in [how Weex works](./index.html), all Weex's JS bundles share a JavaScript instance. So how can we make Vue 2.x used in multiple JS bundles completely isolated, and that one page which extends or rewrites Vue does not affect other pages becomes a problem. Through the collaboration between Weex and Vue. The problem has been solved.
-
-<!-- html5 apis -->
-
-### `<transition>`
-
-Weex supports the awesome `<transition>` syntax in Vue 2.x. Developers can easily define the transition of an interface in both states with `<transition>` tag.
-
-## Notice
-
-Web development and native development, after all, there are some differences in functionality and development experience, which are essentially the differences between the native development platform and the Web platform, and Weex is trying to narrow the scope of this difference. See [differences of Vue 2.x between Weex and web](../../references/vue/index.html)
-
-## Using Vue-related Libs
-
-Vue.js also has more cool related libs. For example [Vuex](https://github.com/vuejs/vuex) and [vue-router](https://github.com/vuejs/vue-router). They all work well in Weex. For using Vuex and vue-router, see [Using Vuex and vue-router in Weex](../../references/vue/difference-of-vuex.html)。
-
-> We developed a complete project based on Weex and Vue 2.x which named [weex-hackernews](https://github.com/weepteam/web-ehackernews). It includes WeexSDK with Vue 2.x in iOS, Android and web. Also we use Vuex and vue-router. The whole project uses the same source code for three different platforms.

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/32a097bf/source/guide/intro/web-dev-experience.md
----------------------------------------------------------------------
diff --git a/source/guide/intro/web-dev-experience.md b/source/guide/intro/web-dev-experience.md
deleted file mode 100644
index 81d0ff2..0000000
--- a/source/guide/intro/web-dev-experience.md
+++ /dev/null
@@ -1,36 +0,0 @@
----
-title: Web Dev Experience
-type: guide
-order: 4.2
-version: 2.1
----
-
-# Web Dev Experience
-
-## What is Web Dev Experience?
-
-Weex dev experience is very close to web dev experience. It describes the UI structure and content with HTML or HTML-based template, describes the UI style with CSS, and describes user behavior and business logic with JavaScript. And it has completed project mechanism.
-
-## Why We Choose Web Dev Experience?
-
-1. There are a huge number of web developers in the community today. Weex can give more web developers abilities to build high-performance and great-experienced mobile apps.
-2. Web development itself has very high efficiency and flexibility. And Weex is committed to solve the dynamic requirement of mobile apps. They just match each other.
-3. Web standards and web dev experience is built by a lot of outstanding technology companies together. It has very high quality assurance.
-4. Standard itself is a force. Base on standards, respect for standards, close to the standard means that there are more possibilities.
-5. The eco-system and community of web today are very prosperous. There are many mature tools, libraries, systems, best practices to be used.
-
-## How Does Weex Support Web Standard?
-
-We have the following aspects to sort out:
-
-* HTML tags: Weex currently supports basic container (div), text, image, video and other components. And almost all of HTML block-level tags can be simulated through the custom container components. Inline-level tags can be simulated  through the custom text components. And Weex also supports some form components such as input / textarea.
-* CSS: Weex supports some commonly used CSS properties, values and units. We will continue to support more based on user feedback and the usage frequency in web.
-* JavaScript: Weex currently offers a simplified version of the DOM APIs for operating the native UI. And Weex will continue to support more W3C Device APIs.
-* About frameworks, Weex officially build Vue 2.0 in. and support its related libs such as vuex, vue-router, etc. At the same time developers can directly use all kinds of third-party JavaScript libs.
-* About engineering, we recommend using npm to pack and manage deps. And we recommend webpack for the JS bundle package. Also we provide weex-devtool, which make developers debug native app just like in Chrome devtools. Weex also is friendly to current mainstream web page publishing system, caching mechanism and other best practices.
-
-**Links**
-
-* [Differences between Weex and web standard](../../references/web-standards.html)
-* [Using Vue.js](./using-vue.html)
-* [Using Devtools](./devtools.html)

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/32a097bf/source/guide/intro/write-once.md
----------------------------------------------------------------------
diff --git a/source/guide/intro/write-once.md b/source/guide/intro/write-once.md
deleted file mode 100644
index 673b302..0000000
--- a/source/guide/intro/write-once.md
+++ /dev/null
@@ -1,23 +0,0 @@
----
-title: Write once, Run Everywhere
-type: guide
-order: 4.4
-version: 2.1
----
-
-# Write Once, Run Everywhere
-
-Weex is a "Write Once, Run Everywhere" solution.
-
-* First, Weex is based on web dev experience, which includes syntax and project management.
-* Second, all components & modules in Weex are discussed by iOS, Android, web developers together to ensure it's common enough to satisfy every platforms.
-* You only need write the same Weex code for each platforms.
-
-We think about it in these aspects below:
-
-1. Today for almost all mobile apps, one app solves the same problem in different platforms. Weex hope to supply a lightweight way to describe your business logic which works well in all platforms you need.
-2. For the differences of all mobile platforms, we are willing to fill the gap in 3 points:
-    1. Design the same APIs for all platforms to ensure different platforms have the same business logic description.
-    2. Implement the APIs with different style or behaviors to ensure the implementation and user experience matches different platforms.
-    3. Platforms obviously differ among each other. We also have some environment variables to help developers in certain situations.
-3. We trust (web) standard is the best for all features in all platforms.

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/32a097bf/source/guide/set-up-env.md
----------------------------------------------------------------------
diff --git a/source/guide/set-up-env.md b/source/guide/set-up-env.md
index ac52367..2986875 100644
--- a/source/guide/set-up-env.md
+++ b/source/guide/set-up-env.md
@@ -1,14 +1,14 @@
 ---
-title: Setup Development Environment
+title: Setup Develop Environment
 type: guide
-order: 1.1
+group: Develop
+order: 5.1
 version: 2.1
-has_chapter_content: true
 ---
 
-# Setup Development Environment
+# Setup Develop Environment
 
-Using [dotWe](http://dotwe.org/vue) is a good choice, but if you want to develop locally on your own machine, you will need to set up your development environment.
+Using [dotWe](http://dotwe.org/vue) is a good choice, but if you want to develop locally on your own machine, you will need to set up your develop environment.
 
 You will need Node.js and the [Weex CLI](https://github.com/weexteam/weex-toolkit).
 

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/32a097bf/source/guide/tools/index.md
----------------------------------------------------------------------
diff --git a/source/guide/tools/index.md b/source/guide/tools/index.md
deleted file mode 100644
index 356bf98..0000000
--- a/source/guide/tools/index.md
+++ /dev/null
@@ -1,11 +0,0 @@
----
-title: Tools 
-type: guide
-order: 5
-version: 2.1
----
-
-# Tools  
-
-- [weex-toolkit](./toolkit.html)
-- [IDEA / WebStorm Plugin](./plugin.html)

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/32a097bf/source/guide/tools/plugin.md
----------------------------------------------------------------------
diff --git a/source/guide/tools/plugin.md b/source/guide/tools/plugin.md
deleted file mode 100644
index a74d866..0000000
--- a/source/guide/tools/plugin.md
+++ /dev/null
@@ -1,68 +0,0 @@
----
-title: Weex Language Support Plugin
-type: guide
-order: 5.1
-version: 2.1
----
-
-# Weex Language Support Plugin
-
-[Weex Language Support](https://plugins.jetbrains.com/plugin/9189-weex-language-support) is a official tools to code highlight, automatic completion,lint and other functions in IDEA, WebStorm or the others IDEs.
-
-### Supported IDEs
-You can install and use this plugin on the following IDEs on any operating system:       
-**IntelliJ IDEA Ultimate, PhpStorm,  WebStorm,  PyCharm,  RubyMine,  AppCode,  CLion,  Gogland,  Rider**
-
-### Install
-Just searching the `Weex Language Support` in plugin repo to install, next you need restart IDE to enable it.    
-![install plugin](https://img.alicdn.com/tfs/TB1y6nrXwvGK1Jjy0FdXXaxzVXa-1316-462.png)
-
-### Configurations
-Open `Preferences -> Other Settings -> Weex language support` to configuration plugin   
-![plugin settings](https://img.alicdn.com/tfs/TB1FonrXwvGK1Jjy0FgXXX9hFXa-559-244.png)    
-- Target Weex Version: Config the version of Weex that your current project in use, default is `LATEST`, it means always using the latest version
-- Vue Support: Config whether to support Vue, you need to restart IDE after turning on or off the set to take effect
-- Custom Rules: Import the custom Weex DSL rules, The format of the custom rules will be listed later
-- Global Weex Components: Sets the location of the module that is applied in the project, in particular, the `node_modules` directory in current project and npm root will be automatically included, you do not need to add them here
-
-
-### Format of Custom DSL Rules 
-Custom rules are included in a json file, the root node of the json file is an array, each element in the array corresponds to a label in the DSL.
-Let's take the example of the `loading>` tag: 
-```js
-{
-    "tag": "loading", //tag name, not null
-    "attrs": [ //attributes of tag, can be null
-      {
-        "name": "display", //attribute name, not null
-        "valuePattern": null, //pattern expression to check the attribute value, can be null
-        "valueEnum": [ //attribute value enumeration, can be null
-          "show",
-          "hide"
-        ],
-        "valueType": "var", //type of attribute value, must be var or function
-        "since": 0, //which version the attribute is added to sdk, such as 0.11
-        "weexOnly": false //whether the attribute is available only in 1.0 syntax, default is false
-      }
-    ],
-    "events": [ //events list, can be null
-      {
-        "name": "loading", //event name, not null
-        "since": 0 //which version the event is added to sdk
-      }
-    ],
-    "parents": [ //The tag is allowed to be a child of which tags, null means no restrictions
-      "list",
-      "scroller"
-    ],
-    "childes": [ //which tags are allowed as their own child tags, null means no restrictions
-      "text",
-      "image",
-      "loading-indicator"
-    ],
-    "document": "/references/components/loading.html" //document link
-  }
-```    
-
-### Contribution
-Please commiting Issues and Pull Requests into the [weex-language-support](https://github.com/misakuo/weex-language-support) project
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/32a097bf/source/guide/tools/toolkit.md
----------------------------------------------------------------------
diff --git a/source/guide/tools/toolkit.md b/source/guide/tools/toolkit.md
deleted file mode 100644
index a325923..0000000
--- a/source/guide/tools/toolkit.md
+++ /dev/null
@@ -1,197 +0,0 @@
----
-title: use weex-toolkit
-type: guide
-order: 5.1
-version: 2.1
----
-
-# weex-toolkit
-
-[weex-toolkit](https://github.com/weexteam/weex-toolkit) is an official command line tool to help developers to create, debug and build their Weex project.
-
-### Install
-use npm to install weex-toolkit:
-
-``` bash
-$ npm install -g weex-toolkit
-```
-if you make it, you can input "weex" in your command line terminal to test it. The right output:
-
-
-![weex-commands](https://img.alicdn.com/tfs/TB1NBhdQXXXXXXzXFXXXXXXXXXX-712-343.png)
-
-if you have never installed node.js, you should go [node.js.org]( https://nodejs.org/en/) to download and install it. 
-* node engine version >= 6. You can try [n](https://github.com/tj/n) to manage your node versions*
-If you meet some errors when installing like `permission error`, please go [weex-toolkit issues](https://github.com/weexteam/weex-toolkit/issues) to find some solution or have a discuss with us. 
-
-
-### initialize Weex project
-```bash
-$ weex init awesome-project
-```
-After command running, you can find `awesome-project` directory and there are some Weex templates in it. 
-There are some useful npm scripts you will use in the future:
-
-- `build`: build the source code and generate the JS bundle
-- `dev`: run webpack watch configuration
-- `serve`: start a web server
-- `debug`: open the debug mode
-
-Then we run `npm run dev & npm run serve` in root directory to start watch mode and static server. 
-
-Finally, we can see the Weex page in `http://localhost:8080/index.html`.
-
-### preview Weex page in time
-
-weex-toolkit supports previewing your Weex file(`.we` or `.vue`) in a watch mode. You only need specify your file path.
-
-``` bash
-$ weex src/foo.vue 
-```
-The browser will auto open the location and you could see the layout and effects of your Weex page. If you have a [Playground](https://weex.apache.org/cn/playground.html) app in your mobile devices, you can scan the QR code at the opened page.
-Try the command below, you’ll preview the whole directory files.
-
-``` bash
-$ weex src --entry src/foo.vue
-```
-You need to specify the directory path and the entry file(`--entry`).
-### build Weex project
-Use ` weex compile ` to build your single weex file or the whole project.
-``` bash
-weex compile src/foo.vue dist
-```
-There are two arguments. One is your code source path (a single file or a directory) and another is your destination path you want to build
-
-### debug 
-
-weex-toolkit has the ability to extend third party script.  And **[Weex devtools](https://github.com/weexteam/weex-devtool)** is a custom devtools for Weex that implements [Chrome Debugging Protocol](https://developer.chrome.com/devtools/docs/debugger-protocol), it is designed to help you quickly inspect your app and debug your JS bundle source in a Chrome web page, both android and iOS platform are supported. So you can use weex-devtools feature by weex-toolkit.
-
-#### usage
-
-``` bash
-weex debug [options] [we_file|bundles_dir]
-
-  Options:
-
-    -h, --help           output usage information
-    -V, --verbose        display logs of debugger server
-    -v, --version        display version
-    -p, --port [port]    set debugger server port
-    -e, --entry [entry]  set the entry bundlejs path when you specific the bundle server root path
-    -m, --mode [mode]    set build mode [transformer|loader]
-    -w, --watch          watch we file changes auto build them and refresh debugger page![default enabled]
-```
-#### start debugger
-
-```
-$ weex debug
-```
-
-
-this command will start debug server and launch a chrome opening `DeviceList` page.
-this page will display a qrcode ,you can use `Playground App` scan it for starting debug.
-
-#### debug `.we` | `.vue` file
-
-```
-$ weex debug your_weex.vue
-```
-
-this command will compile `your_weex.we` to `your_weex.js`  and start the debug server as upon command.
-`your_weex.js` will deploy on the server and displayed in `DeviceList` page as  another qrcode contain the url of your_weex.js.
-
-.
-#### start debugger with a directory of we files
-
-
-```
-$weex debug your/we/path  -e index.we
-```
-
-this command will build every file in `your/we/path `and deploy them on the bundle server. your directory will mapping to  http://localhost:port/weex/ 
-use `-e` to set the entry of these bundles. and the url of `index.we` will display on device list page as another qrcode.
-
-
-#### Features
-
-##### Connect devices
-
-![devtools-main](https://img.alicdn.com/tps/TB13fwSKFXXXXXDaXXXXXXXXXXX-887-828.png)
-
-##### Inspector
-
- Inspector can be used to show your `Element` \ `Network` \ `Console log` \ `ScreenCast` \ `BoxModel` \ `Native View` and so on.
-
-![devtools-inspector](https://img.alicdn.com/tps/TB1O.nwKFXXXXX8XpXXXXXXXXXX-1436-811.png)
-##### Element
-
-![inspector-element](https://img.alicdn.com/tps/TB1.02bKFXXXXXwaXXXXXXXXXXX-2880-1800.png)
-##### NetWork
-##### show the total time and latency
-
-![inspector-network](https://img.alicdn.com/tps/TB1NjO_KFXXXXcaaXXXXXXXXXXX-2880-1800.png)
-##### show the header and response
-
-![inspector-network](https://img.alicdn.com/tps/TB1ck6lKFXXXXbZXFXXXXXXXXXX-2880-1800.png)
-##### Console
-
-![inspector-console](https://img.alicdn.com/tps/TB1a7HqKFXXXXXMXFXXXXXXXXXX-2880-1800.png)
-##### Resource
-
-![inspector-resource](https://img.alicdn.com/tps/TB1oY6cKFXXXXXQaXXXXXXXXXXX-2880-1800.png)
-#### Debugger
-
-![devtools-debugger](https://img.alicdn.com/tps/TB1aPTEKFXXXXXaXXXXXXXXXXXX-1436-813.png)
-##### Breakpoint and CallStack
-
-![debugger-breakpoint](https://img.alicdn.com/tps/TB1_trbKFXXXXc0XVXXXXXXXXXX-2880-1800.png)
-#### Integrate devtools
-* Android
-    * See the doc [Weex devtools (Android)](../../references/advanced/integrate-devtool-to-android.html), it will lead you to config and use it step by step.
-* IOS
-    * See the doc [Weex devtools (IOS)](../../references/advanced/integrate-devtool-to-ios.html), it will lead you to config and use it step by step.
-  
-### weex-toolkit extends weexpack command
-
-[weexpack](https://github.com/weexteam/weex-pack) helps to setup Weex application from scratch quickly. With simple commands, developers could create a Weex project, add different platform template, could install plugins from local, GitHub or Weex market, could pack up his application project and run on mobile. For those who would like to share his own plugins, he could publish them to the Weex market.
-
-Now weex-toolkit can run the same commands of `weexpack` because of the new architecture. If your directory is generated by `weexpack`, you can build your iOS or android app.
-
-### weex platform and run commands
-
-Use `platform add|remove` to add or remove Weex app template and run it in your target devices.
-
-``` bash
-$ weex platform add ios
-```
-If you use these commands firstly, you might see the prompt. Just enter Y.
-
-![install weexpack](https://gw.alicdn.com/tfs/TB19n4AQXXXXXawXVXXXXXXXXXX-577-70.png)
-
-Then run platform, you will see an iPhone simulator.
-
-``` bash
-$ weex run ios
-```
-
-
-### weex plugin commands
-
-If you want to use some plugins on the [weex market](https://market.dotwe.org), weex-toolkit is the right choice.
-
-```bash
-$ weex plugin add plugin_name
-```
-You need to specify the plugin name from market like "weex-chart":
-
-``` bash
-$ weex plugin add weex-chart
-```
-
-Remove some plugins(eg: weex-chart):
-
-``` bash
-$ weex plugin remove weex-chart
-```
-
-Learn more about [weexpack](https://github.com/weexteam/weex-pack) .
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/32a097bf/source/guide/using-rax.md
----------------------------------------------------------------------
diff --git a/source/guide/using-rax.md b/source/guide/using-rax.md
new file mode 100644
index 0000000..7aa9b77
--- /dev/null
+++ b/source/guide/using-rax.md
@@ -0,0 +1,7 @@
+---
+title: Using Rax
+type: guide
+group: Develop
+order: 5.3
+version: 2.1
+---

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/32a097bf/source/guide/using-vue.md
----------------------------------------------------------------------
diff --git a/source/guide/using-vue.md b/source/guide/using-vue.md
new file mode 100644
index 0000000..3da03f6
--- /dev/null
+++ b/source/guide/using-vue.md
@@ -0,0 +1,59 @@
+---
+title: Using Vue
+type: guide
+group: Develop
+order: 5.2
+version: 2.1
+---
+
+# Using Vue
+
+## Vue in Weex
+
+[Vue.js](https://vuejs.org/) is an excellent progressive JavaScript framework written by [Evan You](https://twitter.com/youyuxi) which is very easy and flexible to use. Developers can write `*.vue` files with friendly `<template>`, `<style>`, `<script>` tags to build componentized web apps.
+
+![a vue file](//cn.vuejs.org/images/vue-component.png)
+
+In Oct 2016 Vue.js launched 2.0, which includes the virtual-DOM and pre-compiler for HTML templates. This means Vue.js can run in a JS-only environment without HTML / CSS parsers. The virtual-DOM layer also makes Vue 2.x able to render native UIs through JavaScript.
+
+Weex and Vue now support each other officially. Now that Weex includes Vue 2.x as its built-in JS Framework, Vue can be used to develop native mobile apps.
+
+**Links**
+
+* [Weex tutorial](../index.html)
+* [Vue Introduction](https://vuejs.org/v2/guide/)
+* [How Weex works](./index.html)
+
+## New Features of Vue 2.x in Weex
+
+### Stream Rendering
+
+In Weex, developers can use `<foo append="tree|node">` to customize the rendering granularity to balance different UI complexity and business logic in order to get the best first-paint performance. `append=tree` means that the entire node, including all its child nodes, will be one-time rendered to native UI after all of the nodes generated completely. And `append=node` means just render the current node itself first and its child nodes will be futher rendered later.
+
+<!-- dotwe demo -->
+
+### Two-way Data Binding in Form Controls
+
+In Weex, we provide the same `v-model` directive as web dev exprience for both `<input>` and `<textarea>` components. Developers can write `<input v-model="message">` or `<textarea v-model="message">` to bind data `message` and show it on the text box automatically. When user modifies the text box, the value of data `message` will be automatically updated.
+
+<!-- dotwe demo -->
+
+### Isolate Each Page Contexts
+
+As described in [how Weex works](./index.html), all Weex's JS bundles share a JavaScript instance. So how can we make Vue 2.x used in multiple JS bundles completely isolated, and that one page which extends or rewrites Vue does not affect other pages becomes a problem. Through the collaboration between Weex and Vue. The problem has been solved.
+
+<!-- html5 apis -->
+
+### `<transition>`
+
+Weex supports the awesome `<transition>` syntax in Vue 2.x. Developers can easily define the transition of an interface in both states with `<transition>` tag.
+
+## Notice
+
+Web development and native development, after all, there are some differences in functionality and development experience, which are essentially the differences between the native development platform and the Web platform, and Weex is trying to narrow the scope of this difference. See [differences of Vue 2.x between Weex and web](../../references/vue/index.html)
+
+## Using Vue-related Libs
+
+Vue.js also has more cool related libs. For example [Vuex](https://github.com/vuejs/vuex) and [vue-router](https://github.com/vuejs/vue-router). They all work well in Weex. For using Vuex and vue-router, see [Using Vuex and vue-router in Weex](../../references/vue/difference-of-vuex.html)。
+
+> We developed a complete project based on Weex and Vue 2.x which named [weex-hackernews](https://github.com/weepteam/web-ehackernews). It includes WeexSDK with Vue 2.x in iOS, Android and web. Also we use Vuex and vue-router. The whole project uses the same source code for three different platforms.