weex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sospar...@apache.org
Subject [38/39] incubator-weex-site git commit: * update site
Date Thu, 02 Mar 2017 03:54:30 GMT
http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/22906b6f/content/cn/guide/index.html
----------------------------------------------------------------------
diff --git a/content/cn/guide/index.html b/content/cn/guide/index.html
index 83d464a..8657156 100644
--- a/content/cn/guide/index.html
+++ b/content/cn/guide/index.html
@@ -5,49 +5,6 @@
   
   <title>快速上手 | Weex</title>
   <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
-  <script>
-  ;(function(){
-    var currentOrigin = location.origin,
-        currentPathname = location.pathname,
-        currentLang = navigator.language,
-        selectedLang = '';
-
-    if (!currentLang) {
-      currentLang = navigator.browserLanguage;
-    }
-
-    if (window.sessionStorage) {
-      selectedLang = window.sessionStorage.getItem('lang')
-    }
-
-    if (!selectedLang) {
-      if (currentLang.indexOf('zh') >= 0 && currentPathname.indexOf('/cn/') != 0) {
-        location.href = getUrl('cn', currentOrigin, currentPathname);
-      } else if (currentLang.indexOf('en') >= 0 && currentPathname.indexOf('/cn/') == 0) {
-        location.href = getUrl('en', currentOrigin, currentPathname);
-      }
-    }
-
-    function getUrl (lang, origin, path) {
-      if (lang == 'en') {
-        if (path.indexOf('/cn/') == 0) {
-          return origin + path.substr(3)
-        } else {
-          return origin + path
-        }
-      } else {
-        var langPath = '/' + lang + '/'
-        var pathStart = path.indexOf(langPath)
-
-        if (pathStart == 0) {
-          return origin + path
-        } else {
-          return origin + langPath + path.substr(1)
-        }
-      }
-    }
-  })();
-  </script>
   <meta name="description" content="快速上手Weex 是一套简单易用的跨平台开发方案,能以 web 的开发体验构建高性能、可扩展的 native 应用,为了做到这些,Weex 与  Vue 合作,使用 Vue 作为上层框架,并遵循 W3C 标准实现了统一的 JSEngine 和 DOM API,这样一来,你甚至可以使用其他框架驱动 Weex,打造三端一致的 native 应用。
 Vue 是什么?Vue.js 是 Evan You 开">
 <meta property="og:type" content="website">
@@ -58,7 +15,7 @@ Vue 是什么?Vue.js 是 Evan You 开">
 Vue 是什么?Vue.js 是 Evan You 开">
 <meta property="og:image" content="https://img.alicdn.com/tps/TB1Ymw3OpXXXXcvXpXXXXXXXXXX-500-1013.jpg">
 <meta property="og:image" content="https://img.alicdn.com/tps/TB1kHFrOFXXXXaYXXXXXXXXXXXX-615-308.jpg">
-<meta property="og:updated_time" content="2017-02-26T06:06:13.000Z">
+<meta property="og:updated_time" content="2017-03-02T03:29:33.000Z">
 <meta name="twitter:card" content="summary">
 <meta name="twitter:title" content="快速上手">
 <meta name="twitter:description" content="快速上手Weex 是一套简单易用的跨平台开发方案,能以 web 的开发体验构建高性能、可扩展的 native 应用,为了做到这些,Weex 与  Vue 合作,使用 Vue 作为上层框架,并遵循 W3C 标准实现了统一的 JSEngine 和 DOM API,这样一来,你甚至可以使用其他框架驱动 Weex,打造三端一致的 native 应用。
@@ -121,13 +78,29 @@ Vue 是什么?Vue.js 是 Evan You 开">
         <li>
           <div class="search">
   <form id="search-form" class="search-form"> <!-- 搜索框相关 -->
-    <input type="text" id="search-input-header" name="q" results="0" placeholder="search..." class="form-control search-input" autocomplete="off" autocorrect="off"/>
+    <input type="text" id="search-input-header" name="q" results="0" class="form-control search-input" autocomplete="off" autocorrect="off"/>
     <span class="iconfont icon-search"></span>
   </form>
   <div class="results-panel">
   </div>
 </div>
         </li>
+        <li>
+          <div class="dropdown select-lang">
+            <a href="javascript:;" class="dropdown-toggle">
+              Language
+              <span class="caret"></span>
+            </a>
+            <ul class="dropdown-menu pick-lang">
+              <li>
+                <a href="/guide/index.html" data-lang="en">English</a>
+              </li>
+              <li>
+                <a href="/cn/guide/index.html" data-lang="zh-cn">中文</a>
+              </li>
+            </ul>
+          </div>
+        </li>
         <!--<li></li>-->
       </ul>
     </div>
@@ -144,7 +117,7 @@ Vue 是什么?Vue.js 是 Evan You 开">
     
       <div class="search">
   <form id="search-form" class="search-form"> <!-- 搜索框相关 -->
-    <input type="text" id="search-input-sidebar" name="q" results="0" placeholder="search..." class="form-control search-input" autocomplete="off" autocorrect="off"/>
+    <input type="text" id="search-input-sidebar" name="q" results="0" class="form-control search-input" autocomplete="off" autocorrect="off"/>
     <span class="iconfont icon-search"></span>
   </form>
   <div class="results-panel">
@@ -275,7 +248,7 @@ Vue 是什么?Vue.js 是 Evan You 开">
     
     
       <li>
-        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link">旧文档</a></h3>
+        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link">旧语法文档</a></h3>
       </li>
     
   </ul>
@@ -411,7 +384,7 @@ Vue 是什么?Vue.js 是 Evan You 开">
     
     
       <li>
-        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link">旧文档</a></h3>
+        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link">旧语法文档</a></h3>
       </li>
     
   </ul>
@@ -429,18 +402,22 @@ Vue 是什么?Vue.js 是 Evan You 开">
       </h1>
     
   
-  <time class="article-date" datetime="2017-02-26T06:06:13.000Z">Updated time: 26/02/2017</time>
+  <time class="article-date" datetime="2017-03-02T03:29:33.000Z">Updated time: 02/03/2017</time>
 </header>
     <h1 id="快速上手"><a href="#快速上手" class="headerlink" title="快速上手"></a>快速上手</h1><p>Weex 是一套简单易用的跨平台开发方案,能以 web 的开发体验构建高性能、可扩展的 native 应用,为了做到这些,Weex 与  Vue 合作,使用 Vue 作为上层框架,并遵循 W3C 标准实现了统一的 JSEngine 和 DOM API,这样一来,你甚至可以使用其他框架驱动 Weex,打造三端一致的 native 应用。</p>
-<h2 id="Vue-是什么?"><a href="#Vue-是什么?" class="headerlink" title="Vue 是什么?"></a>Vue 是什么?</h2><p>Vue.js 是 Evan You 开发的渐进式 JavaScript 框架,在易用性、灵活性和性能等方面都非常优秀。开发者能够通过撰写 <code>*.vue</code> 文件,基于 <code>&lt;template&gt;</code>, <code>&lt;style&gt;</code>, <code>&lt;script&gt;</code> 快速构建组件化的 web 应用。</p>
+<h2 id="Vue-是什么?"><a href="#Vue-是什么?" class="headerlink" title="Vue 是什么?"></a>Vue 是什么?</h2><p>Vue.js 是 Evan You 开发的渐进式 JavaScript 框架。开发者能够通过撰写 <code>*.vue</code> 文件,基于 <code>&lt;template&gt;</code>, <code>&lt;style&gt;</code>, <code>&lt;script&gt;</code> 快速构建组件化的 web 应用。</p>
 <h2 id="Hello-World"><a href="#Hello-World" class="headerlink" title="Hello World"></a>Hello World</h2><p>尝试 Weex 最简单的方法是使用 <a href="https://alibaba.github.io/weex/download.html" target="_blank" rel="external">Playground App</a> 和在 <a href="http://dotwe.org" target="_blank" rel="external">dotWe</a> 编写一个 <a href="http://dotwe.org/vue/4d5a0471ece3daabd4681bc6d703c4c1" target="_blank" rel="external">Hello World</a> 例子。你不需要考虑安装开发环境或编写 native 代码,只需要做下面两件事:</p>
 <ul>
 <li>为你的手机安装 <a href="https://alibaba.github.io/weex/download.html" target="_blank" rel="external">Playground App</a>,当然,Weex 是跨平台的框架,你依然可以使用浏览器进行预览,只是这样你就无法感受到 native 优秀的体验了。</li>
 <li>在新标签页中打开 <a href="http://dotwe.org/vue/4d5a0471ece3daabd4681bc6d703c4c1" target="_blank" rel="external">Hello World</a> 例子,点击预览,然后用  Playground 扫码即可。</li>
 </ul>
+<p>在这个例子中,我们看到了熟悉的 HTML 语义化标签、CSS 样式和 Javascript 代码。这是一个最简单的 Weex 示例,它在页面中渲染了一个 “Hello World”。请注意,这不是一个 H5 页面,而是 native 的。</p>
 <p><img src="https://img.alicdn.com/tps/TB1Ymw3OpXXXXcvXpXXXXXXXXXX-500-1013.jpg" alt="mobile_preview"></p>
-<p>很简单,我们可以看到语法就是我们熟悉的 Vue。你可以修改这个例子,再次扫码尝试。</p>
-<h2 id="搭建开发环境"><a href="#搭建开发环境" class="headerlink" title="搭建开发环境"></a>搭建开发环境</h2><h3 id="第一步:安装依赖"><a href="#第一步:安装依赖" class="headerlink" title="第一步:安装依赖"></a>第一步:安装依赖</h3><p>Weex 官方提供了 weex-toolkit 的脚手架工具来辅助开发和调试。首先,你需要 Node.js 和 weex-toolkit。</p>
+<h3 id="发生了什么?"><a href="#发生了什么?" class="headerlink" title="发生了什么?"></a>发生了什么?</h3><p>就如示例代码所示:</p>
+<figure class="highlight html"><table><tr><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">template</span>&gt;</span></div><div class="line">  <span class="tag">&lt;<span class="name">div</span>&gt;</span></div><div class="line">    <span class="tag">&lt;<span class="name">text</span> <span class="attr">class</span>=<span class="string">"text"</span>&gt;</span>&#123;&#123;text&#125;&#125;<span class="tag">&lt;/<span class="name">text</span>&gt;</span></div><div class="line">  <span class="tag">&lt;/<span class="name">div</span>&gt;</span></div><div class="line"><span class="tag">&lt;/<span class="name">template</span>&gt;</span></div><div class="line"></div><div class="line"><span class="tag">&lt;<span class="name">style</span>&gt;</span><span class="css"></span></div><div class="line">  <span class="selector-class">.text</span> &#123;</div><div class="line">    <span class="attribute">font-size</span>: <span class="number">50</span>;</div><div class=
 "line">  &#125;</div><div class="line"><span class="tag">&lt;/<span class="name">style</span>&gt;</span></div><div class="line"></div><div class="line"><span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="javascript"></span></div><div class="line">  <span class="keyword">export</span> <span class="keyword">default</span> &#123;</div><div class="line">    data () &#123;</div><div class="line">      <span class="keyword">return</span> &#123;</div><div class="line">        <span class="attr">text</span>: <span class="string">'Hello World.'</span></div><div class="line">      &#125;</div><div class="line">    &#125;</div><div class="line">  &#125;</div><div class="line"><span class="tag">&lt;/<span class="name">script</span>&gt;</span></div></pre></td></tr></table></figure>
+<p>我们暂时不去关心 Weex 的技术细节,仅看大致的代码结构,我们可以看到语法就是我们熟悉的 Vue。你可以修改这个例子,再次扫码尝试。</p>
+<h2 id="搭建开发环境"><a href="#搭建开发环境" class="headerlink" title="搭建开发环境"></a>搭建开发环境</h2><p>使用 dotWe 对 Weex 尝鲜是一个不错的选择,但如果你想更专业的开发 Weex, dotWe 就不怎么够用了。本节会教你如何搭建本地开发环境进行 Weex 开发。</p>
+<h3 id="第一步:安装依赖"><a href="#第一步:安装依赖" class="headerlink" title="第一步:安装依赖"></a>第一步:安装依赖</h3><p>Weex 官方提供了 weex-toolkit 的脚手架工具来辅助开发和调试。首先,你需要 Node.js 和 weex-toolkit。</p>
 <p>安装 Node.js 方式多种多样,最简单的方式是在 <a href="https://nodejs.org/en/" target="_blank" rel="external">Node.js 官网</a> 下载可执行程序直接安装即可。</p>
 <p>对于 Mac,可以使用 <a href="http://brew.sh/" target="_blank" rel="external">Homebrew</a> 进行安装:</p>
 <figure class="highlight bash"><table><tr><td class="code"><pre><div class="line">brew install node</div></pre></td></tr></table></figure>
@@ -498,7 +475,7 @@ Vue 是什么?Vue.js 是 Evan You 开">
           <a href="/guide/index.html" data-lang="en">English</a>
         </li>
         <li>
-          <a href="/cn/guide/index.html" data-lang="cn">中文</a>
+          <a href="/cn/guide/index.html" data-lang="zh-cn">中文</a>
         </li>
       </ul>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/22906b6f/content/cn/guide/integrate-to-your-app.html
----------------------------------------------------------------------
diff --git a/content/cn/guide/integrate-to-your-app.html b/content/cn/guide/integrate-to-your-app.html
index c326bb9..ad338fa 100644
--- a/content/cn/guide/integrate-to-your-app.html
+++ b/content/cn/guide/integrate-to-your-app.html
@@ -5,49 +5,6 @@
   
   <title>集成 Weex 到已有应用 | Weex</title>
   <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
-  <script>
-  ;(function(){
-    var currentOrigin = location.origin,
-        currentPathname = location.pathname,
-        currentLang = navigator.language,
-        selectedLang = '';
-
-    if (!currentLang) {
-      currentLang = navigator.browserLanguage;
-    }
-
-    if (window.sessionStorage) {
-      selectedLang = window.sessionStorage.getItem('lang')
-    }
-
-    if (!selectedLang) {
-      if (currentLang.indexOf('zh') >= 0 && currentPathname.indexOf('/cn/') != 0) {
-        location.href = getUrl('cn', currentOrigin, currentPathname);
-      } else if (currentLang.indexOf('en') >= 0 && currentPathname.indexOf('/cn/') == 0) {
-        location.href = getUrl('en', currentOrigin, currentPathname);
-      }
-    }
-
-    function getUrl (lang, origin, path) {
-      if (lang == 'en') {
-        if (path.indexOf('/cn/') == 0) {
-          return origin + path.substr(3)
-        } else {
-          return origin + path
-        }
-      } else {
-        var langPath = '/' + lang + '/'
-        var pathStart = path.indexOf(langPath)
-
-        if (pathStart == 0) {
-          return origin + path
-        } else {
-          return origin + langPath + path.substr(1)
-        }
-      }
-    }
-  })();
-  </script>
   <meta name="description" content="集成 Weex 到已有应用集成到 Android注:以下文档都是假设您已经具备一定的Android开发经验。
 Android 集成有两种方式
 源码依赖:能够快速使用WEEX最新功能,可以根据自己项目的特性进行相关改进。
@@ -68,7 +25,7 @@ SDK依赖:WEEX 会在jcenter 定期发布稳定版本。jcenter注:国内可
 前期准备
 已经安装了JDK version&amp;gt;=1.7 并配置了环境变量
 已经">
-<meta property="og:updated_time" content="2017-02-17T02:09:41.000Z">
+<meta property="og:updated_time" content="2017-03-01T06:05:27.000Z">
 <meta name="twitter:card" content="summary">
 <meta name="twitter:title" content="集成 Weex 到已有应用">
 <meta name="twitter:description" content="集成 Weex 到已有应用集成到 Android注:以下文档都是假设您已经具备一定的Android开发经验。
@@ -136,13 +93,29 @@ SDK依赖:WEEX 会在jcenter 定期发布稳定版本。jcenter注:国内可
         <li>
           <div class="search">
   <form id="search-form" class="search-form"> <!-- 搜索框相关 -->
-    <input type="text" id="search-input-header" name="q" results="0" placeholder="search..." class="form-control search-input" autocomplete="off" autocorrect="off"/>
+    <input type="text" id="search-input-header" name="q" results="0" class="form-control search-input" autocomplete="off" autocorrect="off"/>
     <span class="iconfont icon-search"></span>
   </form>
   <div class="results-panel">
   </div>
 </div>
         </li>
+        <li>
+          <div class="dropdown select-lang">
+            <a href="javascript:;" class="dropdown-toggle">
+              Language
+              <span class="caret"></span>
+            </a>
+            <ul class="dropdown-menu pick-lang">
+              <li>
+                <a href="/guide/integrate-to-your-app.html" data-lang="en">English</a>
+              </li>
+              <li>
+                <a href="/cn/guide/integrate-to-your-app.html" data-lang="zh-cn">中文</a>
+              </li>
+            </ul>
+          </div>
+        </li>
         <!--<li></li>-->
       </ul>
     </div>
@@ -159,7 +132,7 @@ SDK依赖:WEEX 会在jcenter 定期发布稳定版本。jcenter注:国内可
     
       <div class="search">
   <form id="search-form" class="search-form"> <!-- 搜索框相关 -->
-    <input type="text" id="search-input-sidebar" name="q" results="0" placeholder="search..." class="form-control search-input" autocomplete="off" autocorrect="off"/>
+    <input type="text" id="search-input-sidebar" name="q" results="0" class="form-control search-input" autocomplete="off" autocorrect="off"/>
     <span class="iconfont icon-search"></span>
   </form>
   <div class="results-panel">
@@ -290,7 +263,7 @@ SDK依赖:WEEX 会在jcenter 定期发布稳定版本。jcenter注:国内可
     
     
       <li>
-        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link">旧文档</a></h3>
+        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link">旧语法文档</a></h3>
       </li>
     
   </ul>
@@ -426,7 +399,7 @@ SDK依赖:WEEX 会在jcenter 定期发布稳定版本。jcenter注:国内可
     
     
       <li>
-        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link">旧文档</a></h3>
+        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link">旧语法文档</a></h3>
       </li>
     
   </ul>
@@ -444,7 +417,7 @@ SDK依赖:WEEX 会在jcenter 定期发布稳定版本。jcenter注:国内可
       </h1>
     
   
-  <time class="article-date" datetime="2017-02-17T02:09:41.000Z">Updated time: 17/02/2017</time>
+  <time class="article-date" datetime="2017-03-01T06:05:27.000Z">Updated time: 01/03/2017</time>
 </header>
     <h1 id="集成-Weex-到已有应用"><a href="#集成-Weex-到已有应用" class="headerlink" title="集成 Weex 到已有应用"></a>集成 Weex 到已有应用</h1><h2 id="集成到-Android"><a href="#集成到-Android" class="headerlink" title="集成到 Android"></a>集成到 Android</h2><p>注:以下文档都是假设您已经具备一定的Android开发经验。</p>
 <h3 id="Android-集成有两种方式"><a href="#Android-集成有两种方式" class="headerlink" title="Android 集成有两种方式"></a>Android 集成有两种方式</h3><ol>
@@ -534,7 +507,7 @@ SDK依赖:WEEX 会在jcenter 定期发布稳定版本。jcenter注:国内可
           <a href="/guide/integrate-to-your-app.html" data-lang="en">English</a>
         </li>
         <li>
-          <a href="/cn/guide/integrate-to-your-app.html" data-lang="cn">中文</a>
+          <a href="/cn/guide/integrate-to-your-app.html" data-lang="zh-cn">中文</a>
         </li>
       </ul>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/22906b6f/content/cn/guide/intro/app-architecture.html
----------------------------------------------------------------------
diff --git a/content/cn/guide/intro/app-architecture.html b/content/cn/guide/intro/app-architecture.html
index 7eb1c7c..acc0f85 100644
--- a/content/cn/guide/intro/app-architecture.html
+++ b/content/cn/guide/intro/app-architecture.html
@@ -5,49 +5,6 @@
   
   <title>用 Weex 构建移动应用 | Weex</title>
   <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
-  <script>
-  ;(function(){
-    var currentOrigin = location.origin,
-        currentPathname = location.pathname,
-        currentLang = navigator.language,
-        selectedLang = '';
-
-    if (!currentLang) {
-      currentLang = navigator.browserLanguage;
-    }
-
-    if (window.sessionStorage) {
-      selectedLang = window.sessionStorage.getItem('lang')
-    }
-
-    if (!selectedLang) {
-      if (currentLang.indexOf('zh') >= 0 && currentPathname.indexOf('/cn/') != 0) {
-        location.href = getUrl('cn', currentOrigin, currentPathname);
-      } else if (currentLang.indexOf('en') >= 0 && currentPathname.indexOf('/cn/') == 0) {
-        location.href = getUrl('en', currentOrigin, currentPathname);
-      }
-    }
-
-    function getUrl (lang, origin, path) {
-      if (lang == 'en') {
-        if (path.indexOf('/cn/') == 0) {
-          return origin + path.substr(3)
-        } else {
-          return origin + path
-        }
-      } else {
-        var langPath = '/' + lang + '/'
-        var pathStart = path.indexOf(langPath)
-
-        if (pathStart == 0) {
-          return origin + path
-        } else {
-          return origin + langPath + path.substr(1)
-        }
-      }
-    }
-  })();
-  </script>
   <meta name="description" content="用 Weex 构建移动应用今天的移动应用这里谈一谈 Weex 对移动应用的理解。
 移动应用需要支撑并行研发如今移动应用的开发需要并行研发的能力,当一个移动应用发展到一定规模的时候,能否支撑大规模的并行研发就成为了一件非常关键而又重要的事情。否则很容易变成工程瓶颈。
 移动应用需要动态性如今移动应用不论从研发节奏、部署的灵活性和时效性、包大小、还是从研发到发布再到反馈的迭代周期上,都和移动互联网的发展">
@@ -58,7 +15,7 @@
 <meta property="og:description" content="用 Weex 构建移动应用今天的移动应用这里谈一谈 Weex 对移动应用的理解。
 移动应用需要支撑并行研发如今移动应用的开发需要并行研发的能力,当一个移动应用发展到一定规模的时候,能否支撑大规模的并行研发就成为了一件非常关键而又重要的事情。否则很容易变成工程瓶颈。
 移动应用需要动态性如今移动应用不论从研发节奏、部署的灵活性和时效性、包大小、还是从研发到发布再到反馈的迭代周期上,都和移动互联网的发展">
-<meta property="og:updated_time" content="2017-02-26T06:06:13.000Z">
+<meta property="og:updated_time" content="2017-03-01T06:05:27.000Z">
 <meta name="twitter:card" content="summary">
 <meta name="twitter:title" content="用 Weex 构建移动应用">
 <meta name="twitter:description" content="用 Weex 构建移动应用今天的移动应用这里谈一谈 Weex 对移动应用的理解。
@@ -121,13 +78,29 @@
         <li>
           <div class="search">
   <form id="search-form" class="search-form"> <!-- 搜索框相关 -->
-    <input type="text" id="search-input-header" name="q" results="0" placeholder="search..." class="form-control search-input" autocomplete="off" autocorrect="off"/>
+    <input type="text" id="search-input-header" name="q" results="0" class="form-control search-input" autocomplete="off" autocorrect="off"/>
     <span class="iconfont icon-search"></span>
   </form>
   <div class="results-panel">
   </div>
 </div>
         </li>
+        <li>
+          <div class="dropdown select-lang">
+            <a href="javascript:;" class="dropdown-toggle">
+              Language
+              <span class="caret"></span>
+            </a>
+            <ul class="dropdown-menu pick-lang">
+              <li>
+                <a href="/guide/intro/app-architecture.html" data-lang="en">English</a>
+              </li>
+              <li>
+                <a href="/cn/guide/intro/app-architecture.html" data-lang="zh-cn">中文</a>
+              </li>
+            </ul>
+          </div>
+        </li>
         <!--<li></li>-->
       </ul>
     </div>
@@ -144,7 +117,7 @@
     
       <div class="search">
   <form id="search-form" class="search-form"> <!-- 搜索框相关 -->
-    <input type="text" id="search-input-sidebar" name="q" results="0" placeholder="search..." class="form-control search-input" autocomplete="off" autocorrect="off"/>
+    <input type="text" id="search-input-sidebar" name="q" results="0" class="form-control search-input" autocomplete="off" autocorrect="off"/>
     <span class="iconfont icon-search"></span>
   </form>
   <div class="results-panel">
@@ -275,7 +248,7 @@
     
     
       <li>
-        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link">旧文档</a></h3>
+        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link">旧语法文档</a></h3>
       </li>
     
   </ul>
@@ -411,7 +384,7 @@
     
     
       <li>
-        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link">旧文档</a></h3>
+        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link">旧语法文档</a></h3>
       </li>
     
   </ul>
@@ -429,7 +402,7 @@
       </h1>
     
   
-  <time class="article-date" datetime="2017-02-26T06:06:13.000Z">Updated time: 26/02/2017</time>
+  <time class="article-date" datetime="2017-03-01T06:05:27.000Z">Updated time: 01/03/2017</time>
 </header>
     <h1 id="用-Weex-构建移动应用"><a href="#用-Weex-构建移动应用" class="headerlink" title="用 Weex 构建移动应用"></a>用 Weex 构建移动应用</h1><h2 id="今天的移动应用"><a href="#今天的移动应用" class="headerlink" title="今天的移动应用"></a>今天的移动应用</h2><p>这里谈一谈 Weex 对移动应用的理解。</p>
 <h3 id="移动应用需要支撑并行研发"><a href="#移动应用需要支撑并行研发" class="headerlink" title="移动应用需要支撑并行研发"></a>移动应用需要支撑并行研发</h3><p>如今移动应用的开发需要并行研发的能力,当一个移动应用发展到一定规模的时候,能否支撑大规模的并行研发就成为了一件非常关键而又重要的事情。否则很容易变成工程瓶颈。</p>
@@ -476,7 +449,7 @@
           <a href="/guide/intro/app-architecture.html" data-lang="en">English</a>
         </li>
         <li>
-          <a href="/cn/guide/intro/app-architecture.html" data-lang="cn">中文</a>
+          <a href="/cn/guide/intro/app-architecture.html" data-lang="zh-cn">中文</a>
         </li>
       </ul>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/22906b6f/content/cn/guide/intro/devtools.html
----------------------------------------------------------------------
diff --git a/content/cn/guide/intro/devtools.html b/content/cn/guide/intro/devtools.html
index c4f243f..8184fe4 100644
--- a/content/cn/guide/intro/devtools.html
+++ b/content/cn/guide/intro/devtools.html
@@ -5,49 +5,6 @@
   
   <title>使用 Devtools | Weex</title>
   <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
-  <script>
-  ;(function(){
-    var currentOrigin = location.origin,
-        currentPathname = location.pathname,
-        currentLang = navigator.language,
-        selectedLang = '';
-
-    if (!currentLang) {
-      currentLang = navigator.browserLanguage;
-    }
-
-    if (window.sessionStorage) {
-      selectedLang = window.sessionStorage.getItem('lang')
-    }
-
-    if (!selectedLang) {
-      if (currentLang.indexOf('zh') >= 0 && currentPathname.indexOf('/cn/') != 0) {
-        location.href = getUrl('cn', currentOrigin, currentPathname);
-      } else if (currentLang.indexOf('en') >= 0 && currentPathname.indexOf('/cn/') == 0) {
-        location.href = getUrl('en', currentOrigin, currentPathname);
-      }
-    }
-
-    function getUrl (lang, origin, path) {
-      if (lang == 'en') {
-        if (path.indexOf('/cn/') == 0) {
-          return origin + path.substr(3)
-        } else {
-          return origin + path
-        }
-      } else {
-        var langPath = '/' + lang + '/'
-        var pathStart = path.indexOf(langPath)
-
-        if (pathStart == 0) {
-          return origin + path
-        } else {
-          return origin + langPath + path.substr(1)
-        }
-      }
-    }
-  })();
-  </script>
   <meta name="description" content="Devtoolsweex devtools是专门为weex定制的一款实现了Chrome Debugging Protocol的inspect/debug工具,能够帮助你快速查看app运行状态和调试weex中的Javascript代码,当前支持IOS和Android两个平台。
 安装$ npm install  -g  weex-toolkit
 用法 weex debug [options] [we_">
@@ -67,7 +24,7 @@
 <meta property="og:image" content="https://img.alicdn.com/tps/TB1oY6cKFXXXXXQaXXXXXXXXXXX-2880-1800.png">
 <meta property="og:image" content="https://img.alicdn.com/tps/TB1aPTEKFXXXXXaXXXXXXXXXXXX-1436-813.png">
 <meta property="og:image" content="https://img.alicdn.com/tps/TB1_trbKFXXXXc0XVXXXXXXXXXX-2880-1800.png">
-<meta property="og:updated_time" content="2017-02-17T02:09:41.000Z">
+<meta property="og:updated_time" content="2017-03-01T06:05:27.000Z">
 <meta name="twitter:card" content="summary">
 <meta name="twitter:title" content="使用 Devtools">
 <meta name="twitter:description" content="Devtoolsweex devtools是专门为weex定制的一款实现了Chrome Debugging Protocol的inspect/debug工具,能够帮助你快速查看app运行状态和调试weex中的Javascript代码,当前支持IOS和Android两个平台。
@@ -131,13 +88,29 @@
         <li>
           <div class="search">
   <form id="search-form" class="search-form"> <!-- 搜索框相关 -->
-    <input type="text" id="search-input-header" name="q" results="0" placeholder="search..." class="form-control search-input" autocomplete="off" autocorrect="off"/>
+    <input type="text" id="search-input-header" name="q" results="0" class="form-control search-input" autocomplete="off" autocorrect="off"/>
     <span class="iconfont icon-search"></span>
   </form>
   <div class="results-panel">
   </div>
 </div>
         </li>
+        <li>
+          <div class="dropdown select-lang">
+            <a href="javascript:;" class="dropdown-toggle">
+              Language
+              <span class="caret"></span>
+            </a>
+            <ul class="dropdown-menu pick-lang">
+              <li>
+                <a href="/guide/intro/devtools.html" data-lang="en">English</a>
+              </li>
+              <li>
+                <a href="/cn/guide/intro/devtools.html" data-lang="zh-cn">中文</a>
+              </li>
+            </ul>
+          </div>
+        </li>
         <!--<li></li>-->
       </ul>
     </div>
@@ -154,7 +127,7 @@
     
       <div class="search">
   <form id="search-form" class="search-form"> <!-- 搜索框相关 -->
-    <input type="text" id="search-input-sidebar" name="q" results="0" placeholder="search..." class="form-control search-input" autocomplete="off" autocorrect="off"/>
+    <input type="text" id="search-input-sidebar" name="q" results="0" class="form-control search-input" autocomplete="off" autocorrect="off"/>
     <span class="iconfont icon-search"></span>
   </form>
   <div class="results-panel">
@@ -285,7 +258,7 @@
     
     
       <li>
-        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link">旧文档</a></h3>
+        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link">旧语法文档</a></h3>
       </li>
     
   </ul>
@@ -421,7 +394,7 @@
     
     
       <li>
-        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link">旧文档</a></h3>
+        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link">旧语法文档</a></h3>
       </li>
     
   </ul>
@@ -439,7 +412,7 @@
       </h1>
     
   
-  <time class="article-date" datetime="2017-02-17T02:09:41.000Z">Updated time: 17/02/2017</time>
+  <time class="article-date" datetime="2017-03-01T06:05:27.000Z">Updated time: 01/03/2017</time>
 </header>
     <h1 id="Devtools"><a href="#Devtools" class="headerlink" title="Devtools"></a>Devtools</h1><p><strong>weex devtools</strong>是专门为weex定制的一款实现了<a href="https://developer.chrome.com/devtools/docs/debugger-protocol" target="_blank" rel="external"><strong>Chrome Debugging Protocol</strong></a>的inspect/debug工具,能够帮助你快速查看app运行状态和调试weex中的Javascript代码,当前支持<strong>IOS</strong>和<strong>Android</strong>两个平台。</p>
 <h2 id="安装"><a href="#安装" class="headerlink" title="安装"></a>安装</h2><figure class="highlight plain"><table><tr><td class="code"><pre><div class="line">$ npm install  -g  weex-toolkit</div></pre></td></tr></table></figure>
@@ -495,7 +468,7 @@
           <a href="/guide/intro/devtools.html" data-lang="en">English</a>
         </li>
         <li>
-          <a href="/cn/guide/intro/devtools.html" data-lang="cn">中文</a>
+          <a href="/cn/guide/intro/devtools.html" data-lang="zh-cn">中文</a>
         </li>
       </ul>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/22906b6f/content/cn/guide/intro/how-it-works.html
----------------------------------------------------------------------
diff --git a/content/cn/guide/intro/how-it-works.html b/content/cn/guide/intro/how-it-works.html
index a1dd945..7610bb9 100644
--- a/content/cn/guide/intro/how-it-works.html
+++ b/content/cn/guide/intro/how-it-works.html
@@ -5,49 +5,6 @@
   
   <title>工作原理 | Weex</title>
   <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
-  <script>
-  ;(function(){
-    var currentOrigin = location.origin,
-        currentPathname = location.pathname,
-        currentLang = navigator.language,
-        selectedLang = '';
-
-    if (!currentLang) {
-      currentLang = navigator.browserLanguage;
-    }
-
-    if (window.sessionStorage) {
-      selectedLang = window.sessionStorage.getItem('lang')
-    }
-
-    if (!selectedLang) {
-      if (currentLang.indexOf('zh') >= 0 && currentPathname.indexOf('/cn/') != 0) {
-        location.href = getUrl('cn', currentOrigin, currentPathname);
-      } else if (currentLang.indexOf('en') >= 0 && currentPathname.indexOf('/cn/') == 0) {
-        location.href = getUrl('en', currentOrigin, currentPathname);
-      }
-    }
-
-    function getUrl (lang, origin, path) {
-      if (lang == 'en') {
-        if (path.indexOf('/cn/') == 0) {
-          return origin + path.substr(3)
-        } else {
-          return origin + path
-        }
-      } else {
-        var langPath = '/' + lang + '/'
-        var pathStart = path.indexOf(langPath)
-
-        if (pathStart == 0) {
-          return origin + path
-        } else {
-          return origin + langPath + path.substr(1)
-        }
-      }
-    }
-  })();
-  </script>
   <meta name="description" content="工作原理整体架构Weex 表面上是一个客户端技术,但实际上它串联起了从本地开发环境到云端部署和分发的整个链路。开发者首先可以在本地像撰写 web 页面一样撰写一个 app 的页面,然后编译成一段 JavaScript 代码,形成 Weex 的一个 JS bundle;在云端,开发者可以把生成的 JS bundle 部署上去,然后通过网络请求或预下发的方式传递到用户的移动应用客户端;在移动应用客户端">
 <meta property="og:type" content="website">
 <meta property="og:title" content="工作原理">
@@ -55,7 +12,7 @@
 <meta property="og:site_name" content="Weex">
 <meta property="og:description" content="工作原理整体架构Weex 表面上是一个客户端技术,但实际上它串联起了从本地开发环境到云端部署和分发的整个链路。开发者首先可以在本地像撰写 web 页面一样撰写一个 app 的页面,然后编译成一段 JavaScript 代码,形成 Weex 的一个 JS bundle;在云端,开发者可以把生成的 JS bundle 部署上去,然后通过网络请求或预下发的方式传递到用户的移动应用客户端;在移动应用客户端">
 <meta property="og:image" content="https://weex.apache.org/../images/flow.png">
-<meta property="og:updated_time" content="2017-02-26T06:06:13.000Z">
+<meta property="og:updated_time" content="2017-03-01T06:05:27.000Z">
 <meta name="twitter:card" content="summary">
 <meta name="twitter:title" content="工作原理">
 <meta name="twitter:description" content="工作原理整体架构Weex 表面上是一个客户端技术,但实际上它串联起了从本地开发环境到云端部署和分发的整个链路。开发者首先可以在本地像撰写 web 页面一样撰写一个 app 的页面,然后编译成一段 JavaScript 代码,形成 Weex 的一个 JS bundle;在云端,开发者可以把生成的 JS bundle 部署上去,然后通过网络请求或预下发的方式传递到用户的移动应用客户端;在移动应用客户端">
@@ -117,13 +74,29 @@
         <li>
           <div class="search">
   <form id="search-form" class="search-form"> <!-- 搜索框相关 -->
-    <input type="text" id="search-input-header" name="q" results="0" placeholder="search..." class="form-control search-input" autocomplete="off" autocorrect="off"/>
+    <input type="text" id="search-input-header" name="q" results="0" class="form-control search-input" autocomplete="off" autocorrect="off"/>
     <span class="iconfont icon-search"></span>
   </form>
   <div class="results-panel">
   </div>
 </div>
         </li>
+        <li>
+          <div class="dropdown select-lang">
+            <a href="javascript:;" class="dropdown-toggle">
+              Language
+              <span class="caret"></span>
+            </a>
+            <ul class="dropdown-menu pick-lang">
+              <li>
+                <a href="/guide/intro/how-it-works.html" data-lang="en">English</a>
+              </li>
+              <li>
+                <a href="/cn/guide/intro/how-it-works.html" data-lang="zh-cn">中文</a>
+              </li>
+            </ul>
+          </div>
+        </li>
         <!--<li></li>-->
       </ul>
     </div>
@@ -140,7 +113,7 @@
     
       <div class="search">
   <form id="search-form" class="search-form"> <!-- 搜索框相关 -->
-    <input type="text" id="search-input-sidebar" name="q" results="0" placeholder="search..." class="form-control search-input" autocomplete="off" autocorrect="off"/>
+    <input type="text" id="search-input-sidebar" name="q" results="0" class="form-control search-input" autocomplete="off" autocorrect="off"/>
     <span class="iconfont icon-search"></span>
   </form>
   <div class="results-panel">
@@ -271,7 +244,7 @@
     
     
       <li>
-        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link">旧文档</a></h3>
+        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link">旧语法文档</a></h3>
       </li>
     
   </ul>
@@ -407,7 +380,7 @@
     
     
       <li>
-        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link">旧文档</a></h3>
+        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link">旧语法文档</a></h3>
       </li>
     
   </ul>
@@ -425,7 +398,7 @@
       </h1>
     
   
-  <time class="article-date" datetime="2017-02-26T06:06:13.000Z">Updated time: 26/02/2017</time>
+  <time class="article-date" datetime="2017-03-01T06:05:27.000Z">Updated time: 01/03/2017</time>
 </header>
     <h1 id="工作原理"><a href="#工作原理" class="headerlink" title="工作原理"></a>工作原理</h1><h2 id="整体架构"><a href="#整体架构" class="headerlink" title="整体架构"></a>整体架构</h2><p>Weex 表面上是一个客户端技术,但实际上它串联起了从本地开发环境到云端部署和分发的整个链路。开发者首先可以在本地像撰写 web 页面一样撰写一个 app 的页面,然后编译成一段 JavaScript 代码,形成 Weex 的一个 JS bundle;在云端,开发者可以把生成的 JS bundle 部署上去,然后通过网络请求或预下发的方式传递到用户的移动应用客户端;在移动应用客户端里,WeexSDK 会准备好一个 JavaScript 引擎,并且在用户打开一个 Weex 页面时执行相应的 JS bundle,并在执行过程中产生各种命令发送到 native 端进行的界面渲染或数据存储、网络通信、调用设备功能、用户交互响应等移动应用的场景实践;
 同时,如果用户没有安装移动应用,他仍然可以在浏览器里打开一个相同的 web 页面,这个页面是使用相同的页面源代码,通过浏览器里的 JavaScript 引擎运行起来的。</p>
 <p><img src="../images/flow.png" alt="How it works"></p>
@@ -478,7 +451,7 @@
           <a href="/guide/intro/how-it-works.html" data-lang="en">English</a>
         </li>
         <li>
-          <a href="/cn/guide/intro/how-it-works.html" data-lang="cn">中文</a>
+          <a href="/cn/guide/intro/how-it-works.html" data-lang="zh-cn">中文</a>
         </li>
       </ul>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/22906b6f/content/cn/guide/intro/index.html
----------------------------------------------------------------------
diff --git a/content/cn/guide/intro/index.html b/content/cn/guide/intro/index.html
index 6ba7dcf..5c2f01a 100644
--- a/content/cn/guide/intro/index.html
+++ b/content/cn/guide/intro/index.html
@@ -5,49 +5,6 @@
   
   <title>介绍 | Weex</title>
   <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
-  <script>
-  ;(function(){
-    var currentOrigin = location.origin,
-        currentPathname = location.pathname,
-        currentLang = navigator.language,
-        selectedLang = '';
-
-    if (!currentLang) {
-      currentLang = navigator.browserLanguage;
-    }
-
-    if (window.sessionStorage) {
-      selectedLang = window.sessionStorage.getItem('lang')
-    }
-
-    if (!selectedLang) {
-      if (currentLang.indexOf('zh') >= 0 && currentPathname.indexOf('/cn/') != 0) {
-        location.href = getUrl('cn', currentOrigin, currentPathname);
-      } else if (currentLang.indexOf('en') >= 0 && currentPathname.indexOf('/cn/') == 0) {
-        location.href = getUrl('en', currentOrigin, currentPathname);
-      }
-    }
-
-    function getUrl (lang, origin, path) {
-      if (lang == 'en') {
-        if (path.indexOf('/cn/') == 0) {
-          return origin + path.substr(3)
-        } else {
-          return origin + path
-        }
-      } else {
-        var langPath = '/' + lang + '/'
-        var pathStart = path.indexOf(langPath)
-
-        if (pathStart == 0) {
-          return origin + path
-        } else {
-          return origin + langPath + path.substr(1)
-        }
-      }
-    }
-  })();
-  </script>
   <meta name="description" content="Intro
 工作原理
 Web 开发体验
@@ -66,7 +23,7 @@ Web 开发体验
 一次撰写,多端运行
 用 Weex 构建移动应用
 Weex 页面结构">
-<meta property="og:updated_time" content="2017-02-17T02:09:41.000Z">
+<meta property="og:updated_time" content="2017-03-01T06:05:27.000Z">
 <meta name="twitter:card" content="summary">
 <meta name="twitter:title" content="介绍">
 <meta name="twitter:description" content="Intro
@@ -133,13 +90,29 @@ Weex 页面结构">
         <li>
           <div class="search">
   <form id="search-form" class="search-form"> <!-- 搜索框相关 -->
-    <input type="text" id="search-input-header" name="q" results="0" placeholder="search..." class="form-control search-input" autocomplete="off" autocorrect="off"/>
+    <input type="text" id="search-input-header" name="q" results="0" class="form-control search-input" autocomplete="off" autocorrect="off"/>
     <span class="iconfont icon-search"></span>
   </form>
   <div class="results-panel">
   </div>
 </div>
         </li>
+        <li>
+          <div class="dropdown select-lang">
+            <a href="javascript:;" class="dropdown-toggle">
+              Language
+              <span class="caret"></span>
+            </a>
+            <ul class="dropdown-menu pick-lang">
+              <li>
+                <a href="/guide/intro/index.html" data-lang="en">English</a>
+              </li>
+              <li>
+                <a href="/cn/guide/intro/index.html" data-lang="zh-cn">中文</a>
+              </li>
+            </ul>
+          </div>
+        </li>
         <!--<li></li>-->
       </ul>
     </div>
@@ -156,7 +129,7 @@ Weex 页面结构">
     
       <div class="search">
   <form id="search-form" class="search-form"> <!-- 搜索框相关 -->
-    <input type="text" id="search-input-sidebar" name="q" results="0" placeholder="search..." class="form-control search-input" autocomplete="off" autocorrect="off"/>
+    <input type="text" id="search-input-sidebar" name="q" results="0" class="form-control search-input" autocomplete="off" autocorrect="off"/>
     <span class="iconfont icon-search"></span>
   </form>
   <div class="results-panel">
@@ -287,7 +260,7 @@ Weex 页面结构">
     
     
       <li>
-        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link">旧文档</a></h3>
+        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link">旧语法文档</a></h3>
       </li>
     
   </ul>
@@ -423,7 +396,7 @@ Weex 页面结构">
     
     
       <li>
-        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link">旧文档</a></h3>
+        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link">旧语法文档</a></h3>
       </li>
     
   </ul>
@@ -441,7 +414,7 @@ Weex 页面结构">
       </h1>
     
   
-  <time class="article-date" datetime="2017-02-17T02:09:41.000Z">Updated time: 17/02/2017</time>
+  <time class="article-date" datetime="2017-03-01T06:05:27.000Z">Updated time: 01/03/2017</time>
 </header>
     <h1 id="Intro"><a href="#Intro" class="headerlink" title="Intro"></a>Intro</h1><ul>
 <li><a href="./how-it-works.html">工作原理</a></li>
@@ -472,7 +445,7 @@ Weex 页面结构">
           <a href="/guide/intro/index.html" data-lang="en">English</a>
         </li>
         <li>
-          <a href="/cn/guide/intro/index.html" data-lang="cn">中文</a>
+          <a href="/cn/guide/intro/index.html" data-lang="zh-cn">中文</a>
         </li>
       </ul>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/22906b6f/content/cn/guide/intro/page-architecture.html
----------------------------------------------------------------------
diff --git a/content/cn/guide/intro/page-architecture.html b/content/cn/guide/intro/page-architecture.html
index 893f4ef..996e4e5 100644
--- a/content/cn/guide/intro/page-architecture.html
+++ b/content/cn/guide/intro/page-architecture.html
@@ -5,49 +5,6 @@
   
   <title>Weex 页面结构 | Weex</title>
   <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
-  <script>
-  ;(function(){
-    var currentOrigin = location.origin,
-        currentPathname = location.pathname,
-        currentLang = navigator.language,
-        selectedLang = '';
-
-    if (!currentLang) {
-      currentLang = navigator.browserLanguage;
-    }
-
-    if (window.sessionStorage) {
-      selectedLang = window.sessionStorage.getItem('lang')
-    }
-
-    if (!selectedLang) {
-      if (currentLang.indexOf('zh') >= 0 && currentPathname.indexOf('/cn/') != 0) {
-        location.href = getUrl('cn', currentOrigin, currentPathname);
-      } else if (currentLang.indexOf('en') >= 0 && currentPathname.indexOf('/cn/') == 0) {
-        location.href = getUrl('en', currentOrigin, currentPathname);
-      }
-    }
-
-    function getUrl (lang, origin, path) {
-      if (lang == 'en') {
-        if (path.indexOf('/cn/') == 0) {
-          return origin + path.substr(3)
-        } else {
-          return origin + path
-        }
-      } else {
-        var langPath = '/' + lang + '/'
-        var pathStart = path.indexOf(langPath)
-
-        if (pathStart == 0) {
-          return origin + path
-        } else {
-          return origin + langPath + path.substr(1)
-        }
-      }
-    }
-  })();
-  </script>
   <meta name="description" content="Weex 页面结构一个 Weex 页面就是一个相对独立解耦的移动应用界面,它不仅包括了界面展示、更包含了逻辑处理、设备能力使用、生命周期管理等部分。
 界面DOM 模型Weex 页面通过类似 HTML DOM 的方式管理界面,首先页面会被分解为一个 DOM 树,,每个 DOM 结点都代表了一个相对独立的 native 视图的单元。然后不同的视图单元之间通过树形结构组合在了一起,构成一个完整的页面。">
 <meta property="og:type" content="website">
@@ -56,7 +13,7 @@
 <meta property="og:site_name" content="Weex">
 <meta property="og:description" content="Weex 页面结构一个 Weex 页面就是一个相对独立解耦的移动应用界面,它不仅包括了界面展示、更包含了逻辑处理、设备能力使用、生命周期管理等部分。
 界面DOM 模型Weex 页面通过类似 HTML DOM 的方式管理界面,首先页面会被分解为一个 DOM 树,,每个 DOM 结点都代表了一个相对独立的 native 视图的单元。然后不同的视图单元之间通过树形结构组合在了一起,构成一个完整的页面。">
-<meta property="og:updated_time" content="2017-02-26T06:06:13.000Z">
+<meta property="og:updated_time" content="2017-03-01T06:05:27.000Z">
 <meta name="twitter:card" content="summary">
 <meta name="twitter:title" content="Weex 页面结构">
 <meta name="twitter:description" content="Weex 页面结构一个 Weex 页面就是一个相对独立解耦的移动应用界面,它不仅包括了界面展示、更包含了逻辑处理、设备能力使用、生命周期管理等部分。
@@ -118,13 +75,29 @@
         <li>
           <div class="search">
   <form id="search-form" class="search-form"> <!-- 搜索框相关 -->
-    <input type="text" id="search-input-header" name="q" results="0" placeholder="search..." class="form-control search-input" autocomplete="off" autocorrect="off"/>
+    <input type="text" id="search-input-header" name="q" results="0" class="form-control search-input" autocomplete="off" autocorrect="off"/>
     <span class="iconfont icon-search"></span>
   </form>
   <div class="results-panel">
   </div>
 </div>
         </li>
+        <li>
+          <div class="dropdown select-lang">
+            <a href="javascript:;" class="dropdown-toggle">
+              Language
+              <span class="caret"></span>
+            </a>
+            <ul class="dropdown-menu pick-lang">
+              <li>
+                <a href="/guide/intro/page-architecture.html" data-lang="en">English</a>
+              </li>
+              <li>
+                <a href="/cn/guide/intro/page-architecture.html" data-lang="zh-cn">中文</a>
+              </li>
+            </ul>
+          </div>
+        </li>
         <!--<li></li>-->
       </ul>
     </div>
@@ -141,7 +114,7 @@
     
       <div class="search">
   <form id="search-form" class="search-form"> <!-- 搜索框相关 -->
-    <input type="text" id="search-input-sidebar" name="q" results="0" placeholder="search..." class="form-control search-input" autocomplete="off" autocorrect="off"/>
+    <input type="text" id="search-input-sidebar" name="q" results="0" class="form-control search-input" autocomplete="off" autocorrect="off"/>
     <span class="iconfont icon-search"></span>
   </form>
   <div class="results-panel">
@@ -272,7 +245,7 @@
     
     
       <li>
-        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link">旧文档</a></h3>
+        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link">旧语法文档</a></h3>
       </li>
     
   </ul>
@@ -408,7 +381,7 @@
     
     
       <li>
-        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link">旧文档</a></h3>
+        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link">旧语法文档</a></h3>
       </li>
     
   </ul>
@@ -426,7 +399,7 @@
       </h1>
     
   
-  <time class="article-date" datetime="2017-02-26T06:06:13.000Z">Updated time: 26/02/2017</time>
+  <time class="article-date" datetime="2017-03-01T06:05:27.000Z">Updated time: 01/03/2017</time>
 </header>
     <h1 id="Weex-页面结构"><a href="#Weex-页面结构" class="headerlink" title="Weex 页面结构"></a>Weex 页面结构</h1><p>一个 Weex 页面就是一个相对独立解耦的移动应用界面,它不仅包括了界面展示、更包含了逻辑处理、设备能力使用、生命周期管理等部分。</p>
 <h2 id="界面"><a href="#界面" class="headerlink" title="界面"></a>界面</h2><h3 id="DOM-模型"><a href="#DOM-模型" class="headerlink" title="DOM 模型"></a>DOM 模型</h3><p>Weex 页面通过类似 HTML DOM 的方式管理界面,首先页面会被分解为一个 DOM 树,,每个 DOM 结点都代表了一个相对独立的 native 视图的单元。然后不同的视图单元之间通过树形结构组合在了一起,构成一个完整的页面。</p>
@@ -472,7 +445,7 @@
           <a href="/guide/intro/page-architecture.html" data-lang="en">English</a>
         </li>
         <li>
-          <a href="/cn/guide/intro/page-architecture.html" data-lang="cn">中文</a>
+          <a href="/cn/guide/intro/page-architecture.html" data-lang="zh-cn">中文</a>
         </li>
       </ul>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/22906b6f/content/cn/guide/intro/using-vue.html
----------------------------------------------------------------------
diff --git a/content/cn/guide/intro/using-vue.html b/content/cn/guide/intro/using-vue.html
index 76d5c25..bbfee8e 100644
--- a/content/cn/guide/intro/using-vue.html
+++ b/content/cn/guide/intro/using-vue.html
@@ -5,49 +5,6 @@
   
   <title>使用 Vue 开发 Weex 页面 | Weex</title>
   <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
-  <script>
-  ;(function(){
-    var currentOrigin = location.origin,
-        currentPathname = location.pathname,
-        currentLang = navigator.language,
-        selectedLang = '';
-
-    if (!currentLang) {
-      currentLang = navigator.browserLanguage;
-    }
-
-    if (window.sessionStorage) {
-      selectedLang = window.sessionStorage.getItem('lang')
-    }
-
-    if (!selectedLang) {
-      if (currentLang.indexOf('zh') >= 0 && currentPathname.indexOf('/cn/') != 0) {
-        location.href = getUrl('cn', currentOrigin, currentPathname);
-      } else if (currentLang.indexOf('en') >= 0 && currentPathname.indexOf('/cn/') == 0) {
-        location.href = getUrl('en', currentOrigin, currentPathname);
-      }
-    }
-
-    function getUrl (lang, origin, path) {
-      if (lang == 'en') {
-        if (path.indexOf('/cn/') == 0) {
-          return origin + path.substr(3)
-        } else {
-          return origin + path
-        }
-      } else {
-        var langPath = '/' + lang + '/'
-        var pathStart = path.indexOf(langPath)
-
-        if (pathStart == 0) {
-          return origin + path
-        } else {
-          return origin + langPath + path.substr(1)
-        }
-      }
-    }
-  })();
-  </script>
   <meta name="description" content="使用 Vue 开发 Weex 页面Vue in WeexVue.js 是 Evan You 开发的渐进式 JavaScript 框架,在易用性、灵活性和性能等方面都非常优秀。开发者能够通过撰写 *.vue 文件,基于 &amp;lt;template&amp;gt;, &amp;lt;style&amp;gt;, &amp;lt;script&amp;gt; 快速构建组件化的 web 应用。
 
 Vue.js 在 2016 年 10 月正式发布了">
@@ -59,7 +16,7 @@ Vue.js 在 2016 年 10 月正式发布了">
 
 Vue.js 在 2016 年 10 月正式发布了">
 <meta property="og:image" content="https://weex.apache.org//cn.vuejs.org/images/vue-component.png">
-<meta property="og:updated_time" content="2017-02-26T06:06:13.000Z">
+<meta property="og:updated_time" content="2017-03-02T03:28:11.000Z">
 <meta name="twitter:card" content="summary">
 <meta name="twitter:title" content="使用 Vue 开发 Weex 页面">
 <meta name="twitter:description" content="使用 Vue 开发 Weex 页面Vue in WeexVue.js 是 Evan You 开发的渐进式 JavaScript 框架,在易用性、灵活性和性能等方面都非常优秀。开发者能够通过撰写 *.vue 文件,基于 &amp;lt;template&amp;gt;, &amp;lt;style&amp;gt;, &amp;lt;script&amp;gt; 快速构建组件化的 web 应用。
@@ -123,13 +80,29 @@ Vue.js 在 2016 年 10 月正式发布了">
         <li>
           <div class="search">
   <form id="search-form" class="search-form"> <!-- 搜索框相关 -->
-    <input type="text" id="search-input-header" name="q" results="0" placeholder="search..." class="form-control search-input" autocomplete="off" autocorrect="off"/>
+    <input type="text" id="search-input-header" name="q" results="0" class="form-control search-input" autocomplete="off" autocorrect="off"/>
     <span class="iconfont icon-search"></span>
   </form>
   <div class="results-panel">
   </div>
 </div>
         </li>
+        <li>
+          <div class="dropdown select-lang">
+            <a href="javascript:;" class="dropdown-toggle">
+              Language
+              <span class="caret"></span>
+            </a>
+            <ul class="dropdown-menu pick-lang">
+              <li>
+                <a href="/guide/intro/using-vue.html" data-lang="en">English</a>
+              </li>
+              <li>
+                <a href="/cn/guide/intro/using-vue.html" data-lang="zh-cn">中文</a>
+              </li>
+            </ul>
+          </div>
+        </li>
         <!--<li></li>-->
       </ul>
     </div>
@@ -146,7 +119,7 @@ Vue.js 在 2016 年 10 月正式发布了">
     
       <div class="search">
   <form id="search-form" class="search-form"> <!-- 搜索框相关 -->
-    <input type="text" id="search-input-sidebar" name="q" results="0" placeholder="search..." class="form-control search-input" autocomplete="off" autocorrect="off"/>
+    <input type="text" id="search-input-sidebar" name="q" results="0" class="form-control search-input" autocomplete="off" autocorrect="off"/>
     <span class="iconfont icon-search"></span>
   </form>
   <div class="results-panel">
@@ -277,7 +250,7 @@ Vue.js 在 2016 年 10 月正式发布了">
     
     
       <li>
-        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link">旧文档</a></h3>
+        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link">旧语法文档</a></h3>
       </li>
     
   </ul>
@@ -413,7 +386,7 @@ Vue.js 在 2016 年 10 月正式发布了">
     
     
       <li>
-        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link">旧文档</a></h3>
+        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link">旧语法文档</a></h3>
       </li>
     
   </ul>
@@ -431,7 +404,7 @@ Vue.js 在 2016 年 10 月正式发布了">
       </h1>
     
   
-  <time class="article-date" datetime="2017-02-26T06:06:13.000Z">Updated time: 26/02/2017</time>
+  <time class="article-date" datetime="2017-03-02T03:28:11.000Z">Updated time: 02/03/2017</time>
 </header>
     <h1 id="使用-Vue-开发-Weex-页面"><a href="#使用-Vue-开发-Weex-页面" class="headerlink" title="使用 Vue 开发 Weex 页面"></a>使用 Vue 开发 Weex 页面</h1><h2 id="Vue-in-Weex"><a href="#Vue-in-Weex" class="headerlink" title="Vue in Weex"></a>Vue in Weex</h2><p><a href="https://vuejs.org/" target="_blank" rel="external">Vue.js</a> 是 Evan You 开发的渐进式 JavaScript 框架,在易用性、灵活性和性能等方面都非常优秀。开发者能够通过撰写 <code>*.vue</code> 文件,基于 <code>&lt;template&gt;</code>, <code>&lt;style&gt;</code>, <code>&lt;script&gt;</code> 快速构建组件化的 web 应用。</p>
 <p><img src="//cn.vuejs.org/images/vue-component.png" alt="a vue file"></p>
@@ -478,7 +451,7 @@ Vue.js 在 2016 年 10 月正式发布了">
           <a href="/guide/intro/using-vue.html" data-lang="en">English</a>
         </li>
         <li>
-          <a href="/cn/guide/intro/using-vue.html" data-lang="cn">中文</a>
+          <a href="/cn/guide/intro/using-vue.html" data-lang="zh-cn">中文</a>
         </li>
       </ul>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/22906b6f/content/cn/guide/intro/web-dev-experience.html
----------------------------------------------------------------------
diff --git a/content/cn/guide/intro/web-dev-experience.html b/content/cn/guide/intro/web-dev-experience.html
index 8fd72d6..7ad4b27 100644
--- a/content/cn/guide/intro/web-dev-experience.html
+++ b/content/cn/guide/intro/web-dev-experience.html
@@ -5,49 +5,6 @@
   
   <title>Web 开发体验 | Weex</title>
   <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
-  <script>
-  ;(function(){
-    var currentOrigin = location.origin,
-        currentPathname = location.pathname,
-        currentLang = navigator.language,
-        selectedLang = '';
-
-    if (!currentLang) {
-      currentLang = navigator.browserLanguage;
-    }
-
-    if (window.sessionStorage) {
-      selectedLang = window.sessionStorage.getItem('lang')
-    }
-
-    if (!selectedLang) {
-      if (currentLang.indexOf('zh') >= 0 && currentPathname.indexOf('/cn/') != 0) {
-        location.href = getUrl('cn', currentOrigin, currentPathname);
-      } else if (currentLang.indexOf('en') >= 0 && currentPathname.indexOf('/cn/') == 0) {
-        location.href = getUrl('en', currentOrigin, currentPathname);
-      }
-    }
-
-    function getUrl (lang, origin, path) {
-      if (lang == 'en') {
-        if (path.indexOf('/cn/') == 0) {
-          return origin + path.substr(3)
-        } else {
-          return origin + path
-        }
-      } else {
-        var langPath = '/' + lang + '/'
-        var pathStart = path.indexOf(langPath)
-
-        if (pathStart == 0) {
-          return origin + path
-        } else {
-          return origin + langPath + path.substr(1)
-        }
-      }
-    }
-  })();
-  </script>
   <meta name="description" content="Web 开发体验什么是 Web 开发体验Weex 的开发体验和 web 的开发体验是非常接近的,它通过 HTML 或基于 HTML 模板来描述界面的结构和内容,通过 CSS 的方式描述界面的展现形式,用 JavaScript 来描述用户行为和业务逻辑。同时有完整的工程机制,如创建、开发、调试、部署。
 为什么选择 Web 开发体验我们选择基于 Web 开发体验有以下几方面原因:
 
@@ -60,7 +17,7 @@
 为什么选择 Web 开发体验我们选择基于 Web 开发体验有以下几方面原因:
 
 今天在技术社区有大">
-<meta property="og:updated_time" content="2017-02-26T06:06:13.000Z">
+<meta property="og:updated_time" content="2017-03-01T06:05:27.000Z">
 <meta name="twitter:card" content="summary">
 <meta name="twitter:title" content="Web 开发体验">
 <meta name="twitter:description" content="Web 开发体验什么是 Web 开发体验Weex 的开发体验和 web 的开发体验是非常接近的,它通过 HTML 或基于 HTML 模板来描述界面的结构和内容,通过 CSS 的方式描述界面的展现形式,用 JavaScript 来描述用户行为和业务逻辑。同时有完整的工程机制,如创建、开发、调试、部署。
@@ -124,13 +81,29 @@
         <li>
           <div class="search">
   <form id="search-form" class="search-form"> <!-- 搜索框相关 -->
-    <input type="text" id="search-input-header" name="q" results="0" placeholder="search..." class="form-control search-input" autocomplete="off" autocorrect="off"/>
+    <input type="text" id="search-input-header" name="q" results="0" class="form-control search-input" autocomplete="off" autocorrect="off"/>
     <span class="iconfont icon-search"></span>
   </form>
   <div class="results-panel">
   </div>
 </div>
         </li>
+        <li>
+          <div class="dropdown select-lang">
+            <a href="javascript:;" class="dropdown-toggle">
+              Language
+              <span class="caret"></span>
+            </a>
+            <ul class="dropdown-menu pick-lang">
+              <li>
+                <a href="/guide/intro/web-dev-experience.html" data-lang="en">English</a>
+              </li>
+              <li>
+                <a href="/cn/guide/intro/web-dev-experience.html" data-lang="zh-cn">中文</a>
+              </li>
+            </ul>
+          </div>
+        </li>
         <!--<li></li>-->
       </ul>
     </div>
@@ -147,7 +120,7 @@
     
       <div class="search">
   <form id="search-form" class="search-form"> <!-- 搜索框相关 -->
-    <input type="text" id="search-input-sidebar" name="q" results="0" placeholder="search..." class="form-control search-input" autocomplete="off" autocorrect="off"/>
+    <input type="text" id="search-input-sidebar" name="q" results="0" class="form-control search-input" autocomplete="off" autocorrect="off"/>
     <span class="iconfont icon-search"></span>
   </form>
   <div class="results-panel">
@@ -278,7 +251,7 @@
     
     
       <li>
-        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link">旧文档</a></h3>
+        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link">旧语法文档</a></h3>
       </li>
     
   </ul>
@@ -414,7 +387,7 @@
     
     
       <li>
-        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link">旧文档</a></h3>
+        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link">旧语法文档</a></h3>
       </li>
     
   </ul>
@@ -432,7 +405,7 @@
       </h1>
     
   
-  <time class="article-date" datetime="2017-02-26T06:06:13.000Z">Updated time: 26/02/2017</time>
+  <time class="article-date" datetime="2017-03-01T06:05:27.000Z">Updated time: 01/03/2017</time>
 </header>
     <h1 id="Web-开发体验"><a href="#Web-开发体验" class="headerlink" title="Web 开发体验"></a>Web 开发体验</h1><h2 id="什么是-Web-开发体验"><a href="#什么是-Web-开发体验" class="headerlink" title="什么是 Web 开发体验"></a>什么是 Web 开发体验</h2><p>Weex 的开发体验和 web 的开发体验是非常接近的,它通过 HTML 或基于 HTML 模板来描述界面的结构和内容,通过 CSS 的方式描述界面的展现形式,用 JavaScript 来描述用户行为和业务逻辑。同时有完整的工程机制,如创建、开发、调试、部署。</p>
 <h2 id="为什么选择-Web-开发体验"><a href="#为什么选择-Web-开发体验" class="headerlink" title="为什么选择 Web 开发体验"></a>为什么选择 Web 开发体验</h2><p>我们选择基于 Web 开发体验有以下几方面原因:</p>
@@ -478,7 +451,7 @@
           <a href="/guide/intro/web-dev-experience.html" data-lang="en">English</a>
         </li>
         <li>
-          <a href="/cn/guide/intro/web-dev-experience.html" data-lang="cn">中文</a>
+          <a href="/cn/guide/intro/web-dev-experience.html" data-lang="zh-cn">中文</a>
         </li>
       </ul>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/22906b6f/content/cn/guide/intro/write-once.html
----------------------------------------------------------------------
diff --git a/content/cn/guide/intro/write-once.html b/content/cn/guide/intro/write-once.html
index d90d3dd..6a42844 100644
--- a/content/cn/guide/intro/write-once.html
+++ b/content/cn/guide/intro/write-once.html
@@ -5,49 +5,6 @@
   
   <title>一次撰写,多端运行 | Weex</title>
   <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
-  <script>
-  ;(function(){
-    var currentOrigin = location.origin,
-        currentPathname = location.pathname,
-        currentLang = navigator.language,
-        selectedLang = '';
-
-    if (!currentLang) {
-      currentLang = navigator.browserLanguage;
-    }
-
-    if (window.sessionStorage) {
-      selectedLang = window.sessionStorage.getItem('lang')
-    }
-
-    if (!selectedLang) {
-      if (currentLang.indexOf('zh') >= 0 && currentPathname.indexOf('/cn/') != 0) {
-        location.href = getUrl('cn', currentOrigin, currentPathname);
-      } else if (currentLang.indexOf('en') >= 0 && currentPathname.indexOf('/cn/') == 0) {
-        location.href = getUrl('en', currentOrigin, currentPathname);
-      }
-    }
-
-    function getUrl (lang, origin, path) {
-      if (lang == 'en') {
-        if (path.indexOf('/cn/') == 0) {
-          return origin + path.substr(3)
-        } else {
-          return origin + path
-        }
-      } else {
-        var langPath = '/' + lang + '/'
-        var pathStart = path.indexOf(langPath)
-
-        if (pathStart == 0) {
-          return origin + path
-        } else {
-          return origin + langPath + path.substr(1)
-        }
-      }
-    }
-  })();
-  </script>
   <meta name="description" content="一次撰写,多端运行Weex 提供了多端一致的技术方案。
 
 首先 web 开发体验在各端当中是相同的。包括语法设计和工程链路。
@@ -70,7 +27,7 @@ Weex 开发同一份代码,可以在不同的端上分别执行,避免了多
 我们这样设计基于以下几点设想:
 
 今天绝大多数的移动应用,虽然要同时出现">
-<meta property="og:updated_time" content="2017-02-17T02:09:41.000Z">
+<meta property="og:updated_time" content="2017-03-01T06:05:27.000Z">
 <meta name="twitter:card" content="summary">
 <meta name="twitter:title" content="一次撰写,多端运行">
 <meta name="twitter:description" content="一次撰写,多端运行Weex 提供了多端一致的技术方案。
@@ -139,13 +96,29 @@ Weex 开发同一份代码,可以在不同的端上分别执行,避免了多
         <li>
           <div class="search">
   <form id="search-form" class="search-form"> <!-- 搜索框相关 -->
-    <input type="text" id="search-input-header" name="q" results="0" placeholder="search..." class="form-control search-input" autocomplete="off" autocorrect="off"/>
+    <input type="text" id="search-input-header" name="q" results="0" class="form-control search-input" autocomplete="off" autocorrect="off"/>
     <span class="iconfont icon-search"></span>
   </form>
   <div class="results-panel">
   </div>
 </div>
         </li>
+        <li>
+          <div class="dropdown select-lang">
+            <a href="javascript:;" class="dropdown-toggle">
+              Language
+              <span class="caret"></span>
+            </a>
+            <ul class="dropdown-menu pick-lang">
+              <li>
+                <a href="/guide/intro/write-once.html" data-lang="en">English</a>
+              </li>
+              <li>
+                <a href="/cn/guide/intro/write-once.html" data-lang="zh-cn">中文</a>
+              </li>
+            </ul>
+          </div>
+        </li>
         <!--<li></li>-->
       </ul>
     </div>
@@ -162,7 +135,7 @@ Weex 开发同一份代码,可以在不同的端上分别执行,避免了多
     
       <div class="search">
   <form id="search-form" class="search-form"> <!-- 搜索框相关 -->
-    <input type="text" id="search-input-sidebar" name="q" results="0" placeholder="search..." class="form-control search-input" autocomplete="off" autocorrect="off"/>
+    <input type="text" id="search-input-sidebar" name="q" results="0" class="form-control search-input" autocomplete="off" autocorrect="off"/>
     <span class="iconfont icon-search"></span>
   </form>
   <div class="results-panel">
@@ -293,7 +266,7 @@ Weex 开发同一份代码,可以在不同的端上分别执行,避免了多
     
     
       <li>
-        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link">旧文档</a></h3>
+        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link">旧语法文档</a></h3>
       </li>
     
   </ul>
@@ -429,7 +402,7 @@ Weex 开发同一份代码,可以在不同的端上分别执行,避免了多
     
     
       <li>
-        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link">旧文档</a></h3>
+        <h3 class="chapter-title"><a href="/cn/v-0.10/guide/index.html" class="sidebar-link">旧语法文档</a></h3>
       </li>
     
   </ul>
@@ -447,7 +420,7 @@ Weex 开发同一份代码,可以在不同的端上分别执行,避免了多
       </h1>
     
   
-  <time class="article-date" datetime="2017-02-17T02:09:41.000Z">Updated time: 17/02/2017</time>
+  <time class="article-date" datetime="2017-03-01T06:05:27.000Z">Updated time: 01/03/2017</time>
 </header>
     <h1 id="一次撰写,多端运行"><a href="#一次撰写,多端运行" class="headerlink" title="一次撰写,多端运行"></a>一次撰写,多端运行</h1><p>Weex 提供了多端一致的技术方案。</p>
 <ul>
@@ -488,7 +461,7 @@ Weex 开发同一份代码,可以在不同的端上分别执行,避免了多
           <a href="/guide/intro/write-once.html" data-lang="en">English</a>
         </li>
         <li>
-          <a href="/cn/guide/intro/write-once.html" data-lang="cn">中文</a>
+          <a href="/cn/guide/intro/write-once.html" data-lang="zh-cn">中文</a>
         </li>
       </ul>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/22906b6f/content/cn/hello/index.html
----------------------------------------------------------------------
diff --git a/content/cn/hello/index.html b/content/cn/hello/index.html
index 537bf93..9b75ce3 100644
--- a/content/cn/hello/index.html
+++ b/content/cn/hello/index.html
@@ -5,54 +5,11 @@
   
   <title>hello | Weex</title>
   <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
-  <script>
-  ;(function(){
-    var currentOrigin = location.origin,
-        currentPathname = location.pathname,
-        currentLang = navigator.language,
-        selectedLang = '';
-
-    if (!currentLang) {
-      currentLang = navigator.browserLanguage;
-    }
-
-    if (window.sessionStorage) {
-      selectedLang = window.sessionStorage.getItem('lang')
-    }
-
-    if (!selectedLang) {
-      if (currentLang.indexOf('zh') >= 0 && currentPathname.indexOf('/cn/') != 0) {
-        location.href = getUrl('cn', currentOrigin, currentPathname);
-      } else if (currentLang.indexOf('en') >= 0 && currentPathname.indexOf('/cn/') == 0) {
-        location.href = getUrl('en', currentOrigin, currentPathname);
-      }
-    }
-
-    function getUrl (lang, origin, path) {
-      if (lang == 'en') {
-        if (path.indexOf('/cn/') == 0) {
-          return origin + path.substr(3)
-        } else {
-          return origin + path
-        }
-      } else {
-        var langPath = '/' + lang + '/'
-        var pathStart = path.indexOf(langPath)
-
-        if (pathStart == 0) {
-          return origin + path
-        } else {
-          return origin + langPath + path.substr(1)
-        }
-      }
-    }
-  })();
-  </script>
   <meta property="og:type" content="article">
 <meta property="og:title" content="hello">
 <meta property="og:url" content="https://weex.apache.org/cn/hello/index.html">
 <meta property="og:site_name" content="Weex">
-<meta property="og:updated_time" content="2017-02-17T02:09:41.000Z">
+<meta property="og:updated_time" content="2017-03-01T06:05:27.000Z">
 <meta name="twitter:card" content="summary">
 <meta name="twitter:title" content="hello">
   
@@ -112,13 +69,29 @@
         <li>
           <div class="search">
   <form id="search-form" class="search-form"> <!-- 搜索框相关 -->
-    <input type="text" id="search-input-header" name="q" results="0" placeholder="search..." class="form-control search-input" autocomplete="off" autocorrect="off"/>
+    <input type="text" id="search-input-header" name="q" results="0" class="form-control search-input" autocomplete="off" autocorrect="off"/>
     <span class="iconfont icon-search"></span>
   </form>
   <div class="results-panel">
   </div>
 </div>
         </li>
+        <li>
+          <div class="dropdown select-lang">
+            <a href="javascript:;" class="dropdown-toggle">
+              Language
+              <span class="caret"></span>
+            </a>
+            <ul class="dropdown-menu pick-lang">
+              <li>
+                <a href="/hello/" data-lang="en">English</a>
+              </li>
+              <li>
+                <a href="/cn/hello/" data-lang="zh-cn">中文</a>
+              </li>
+            </ul>
+          </div>
+        </li>
         <!--<li></li>-->
       </ul>
     </div>
@@ -137,7 +110,7 @@
         <li>
           <div class="search">
   <form id="search-form" class="search-form"> <!-- 搜索框相关 -->
-    <input type="text" id="search-input-sidebar" name="q" results="0" placeholder="search..." class="form-control search-input" autocomplete="off" autocorrect="off"/>
+    <input type="text" id="search-input-sidebar" name="q" results="0" class="form-control search-input" autocomplete="off" autocorrect="off"/>
     <span class="iconfont icon-search"></span>
   </form>
   <div class="results-panel">
@@ -155,7 +128,7 @@
           </a>
         </li>
         <li>
-          <a href="/cn/faq">
+          <a href="/cn/faq.html">
             FAQ
           </a>
         </li>
@@ -226,7 +199,7 @@
           <a href="/hello/" data-lang="en">English</a>
         </li>
         <li>
-          <a href="/cn/hello/" data-lang="cn">中文</a>
+          <a href="/cn/hello/" data-lang="zh-cn">中文</a>
         </li>
       </ul>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/22906b6f/content/cn/index.html
----------------------------------------------------------------------
diff --git a/content/cn/index.html b/content/cn/index.html
index 66c6c1a..976b594 100644
--- a/content/cn/index.html
+++ b/content/cn/index.html
@@ -5,54 +5,11 @@
   
   <title>Weex</title>
   <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
-  <script>
-  ;(function(){
-    var currentOrigin = location.origin,
-        currentPathname = location.pathname,
-        currentLang = navigator.language,
-        selectedLang = '';
-
-    if (!currentLang) {
-      currentLang = navigator.browserLanguage;
-    }
-
-    if (window.sessionStorage) {
-      selectedLang = window.sessionStorage.getItem('lang')
-    }
-
-    if (!selectedLang) {
-      if (currentLang.indexOf('zh') >= 0 && currentPathname.indexOf('/cn/') != 0) {
-        location.href = getUrl('cn', currentOrigin, currentPathname);
-      } else if (currentLang.indexOf('en') >= 0 && currentPathname.indexOf('/cn/') == 0) {
-        location.href = getUrl('en', currentOrigin, currentPathname);
-      }
-    }
-
-    function getUrl (lang, origin, path) {
-      if (lang == 'en') {
-        if (path.indexOf('/cn/') == 0) {
-          return origin + path.substr(3)
-        } else {
-          return origin + path
-        }
-      } else {
-        var langPath = '/' + lang + '/'
-        var pathStart = path.indexOf(langPath)
-
-        if (pathStart == 0) {
-          return origin + path
-        } else {
-          return origin + langPath + path.substr(1)
-        }
-      }
-    }
-  })();
-  </script>
   <meta property="og:type" content="website">
 <meta property="og:title" content="Weex">
 <meta property="og:url" content="https://weex.apache.org/cn/index.html">
 <meta property="og:site_name" content="Weex">
-<meta property="og:updated_time" content="2017-02-17T02:09:41.000Z">
+<meta property="og:updated_time" content="2017-03-01T06:05:27.000Z">
 <meta name="twitter:card" content="summary">
 <meta name="twitter:title" content="Weex">
   
@@ -112,13 +69,29 @@
         <li>
           <div class="search">
   <form id="search-form" class="search-form"> <!-- 搜索框相关 -->
-    <input type="text" id="search-input-header" name="q" results="0" placeholder="search..." class="form-control search-input" autocomplete="off" autocorrect="off"/>
+    <input type="text" id="search-input-header" name="q" results="0" class="form-control search-input" autocomplete="off" autocorrect="off"/>
     <span class="iconfont icon-search"></span>
   </form>
   <div class="results-panel">
   </div>
 </div>
         </li>
+        <li>
+          <div class="dropdown select-lang">
+            <a href="javascript:;" class="dropdown-toggle">
+              Language
+              <span class="caret"></span>
+            </a>
+            <ul class="dropdown-menu pick-lang">
+              <li>
+                <a href="/index.html" data-lang="en">English</a>
+              </li>
+              <li>
+                <a href="/cn/index.html" data-lang="zh-cn">中文</a>
+              </li>
+            </ul>
+          </div>
+        </li>
         <!--<li></li>-->
       </ul>
     </div>
@@ -137,7 +110,7 @@
         <li>
           <div class="search">
   <form id="search-form" class="search-form"> <!-- 搜索框相关 -->
-    <input type="text" id="search-input-sidebar" name="q" results="0" placeholder="search..." class="form-control search-input" autocomplete="off" autocorrect="off"/>
+    <input type="text" id="search-input-sidebar" name="q" results="0" class="form-control search-input" autocomplete="off" autocorrect="off"/>
     <span class="iconfont icon-search"></span>
   </form>
   <div class="results-panel">
@@ -155,7 +128,7 @@
           </a>
         </li>
         <li>
-          <a href="/cn/faq">
+          <a href="/cn/faq.html">
             FAQ
           </a>
         </li>
@@ -190,7 +163,34 @@
     <a class="btn-close-sidebar iconfont  icon-close"></a>
   </div>
 </div>
-  <div class="scene header" style="background: #00BDFF;">
+  <script>
+  ;(function(){
+    var currentOrigin = location.origin || 'https://weex-project.io',
+        currentPathname = location.pathname,
+        currentLang = navigator.language || navigator.browserLanguage || 'en',
+        selectedLang = '';
+
+    if (window.localStorage) {
+      selectedLang = window.localStorage.getItem('lang')
+      currentLang = selectedLang ? selectedLang : currentLang
+    }
+
+    if (/zh|cn/i.test(currentLang)) { // Chinese
+      if (currentPathname.indexOf('/cn/') != 0) {
+        location.href = currentOrigin + '/cn/'
+      }
+    } else if (/en/i.test(currentLang)) { // English
+      if (!/^\/$|^\/index/.test(currentPathname)) {
+        location.href = currentOrigin
+      }
+    } else { // Other
+      if (!/^\/$|^\/index/.test(currentPathname)) {
+        location.href = currentOrigin
+      }
+    }
+  })();
+</script>
+<div class="scene header" style="background: #00BDFF;">
   <div class="scene-container">
     <div class="galaxy left">
       <canvas width="560" height="560" id="left-canvas"></canvas>
@@ -414,7 +414,7 @@ var swiper = new Swiper('.swiper-container', {
   loop: false,
   autoplay: false,
   autoplayDisableOnInteraction: false
-})
+});
 </script>
     
   
@@ -433,7 +433,7 @@ var swiper = new Swiper('.swiper-container', {
           <a href="/index.html" data-lang="en">English</a>
         </li>
         <li>
-          <a href="/cn/index.html" data-lang="cn">中文</a>
+          <a href="/cn/index.html" data-lang="zh-cn">中文</a>
         </li>
       </ul>
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/22906b6f/content/cn/playground.html
----------------------------------------------------------------------
diff --git a/content/cn/playground.html b/content/cn/playground.html
index 7a20480..4f3d832 100644
--- a/content/cn/playground.html
+++ b/content/cn/playground.html
@@ -5,54 +5,11 @@
   
   <title>Weex</title>
   <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
-  <script>
-  ;(function(){
-    var currentOrigin = location.origin,
-        currentPathname = location.pathname,
-        currentLang = navigator.language,
-        selectedLang = '';
-
-    if (!currentLang) {
-      currentLang = navigator.browserLanguage;
-    }
-
-    if (window.sessionStorage) {
-      selectedLang = window.sessionStorage.getItem('lang')
-    }
-
-    if (!selectedLang) {
-      if (currentLang.indexOf('zh') >= 0 && currentPathname.indexOf('/cn/') != 0) {
-        location.href = getUrl('cn', currentOrigin, currentPathname);
-      } else if (currentLang.indexOf('en') >= 0 && currentPathname.indexOf('/cn/') == 0) {
-        location.href = getUrl('en', currentOrigin, currentPathname);
-      }
-    }
-
-    function getUrl (lang, origin, path) {
-      if (lang == 'en') {
-        if (path.indexOf('/cn/') == 0) {
-          return origin + path.substr(3)
-        } else {
-          return origin + path
-        }
-      } else {
-        var langPath = '/' + lang + '/'
-        var pathStart = path.indexOf(langPath)
-
-        if (pathStart == 0) {
-          return origin + path
-        } else {
-          return origin + langPath + path.substr(1)
-        }
-      }
-    }
-  })();
-  </script>
   <meta property="og:type" content="website">
 <meta property="og:title" content="Weex">
 <meta property="og:url" content="https://weex.apache.org/cn/playground.html">
 <meta property="og:site_name" content="Weex">
-<meta property="og:updated_time" content="2017-02-17T02:09:41.000Z">
+<meta property="og:updated_time" content="2017-03-01T06:05:27.000Z">
 <meta name="twitter:card" content="summary">
 <meta name="twitter:title" content="Weex">
   
@@ -112,13 +69,29 @@
         <li>
           <div class="search">
   <form id="search-form" class="search-form"> <!-- 搜索框相关 -->
-    <input type="text" id="search-input-header" name="q" results="0" placeholder="search..." class="form-control search-input" autocomplete="off" autocorrect="off"/>
+    <input type="text" id="search-input-header" name="q" results="0" class="form-control search-input" autocomplete="off" autocorrect="off"/>
     <span class="iconfont icon-search"></span>
   </form>
   <div class="results-panel">
   </div>
 </div>
         </li>
+        <li>
+          <div class="dropdown select-lang">
+            <a href="javascript:;" class="dropdown-toggle">
+              Language
+              <span class="caret"></span>
+            </a>
+            <ul class="dropdown-menu pick-lang">
+              <li>
+                <a href="/playground.html" data-lang="en">English</a>
+              </li>
+              <li>
+                <a href="/cn/playground.html" data-lang="zh-cn">中文</a>
+              </li>
+            </ul>
+          </div>
+        </li>
         <!--<li></li>-->
       </ul>
     </div>
@@ -137,7 +110,7 @@
         <li>
           <div class="search">
   <form id="search-form" class="search-form"> <!-- 搜索框相关 -->
-    <input type="text" id="search-input-sidebar" name="q" results="0" placeholder="search..." class="form-control search-input" autocomplete="off" autocorrect="off"/>
+    <input type="text" id="search-input-sidebar" name="q" results="0" class="form-control search-input" autocomplete="off" autocorrect="off"/>
     <span class="iconfont icon-search"></span>
   </form>
   <div class="results-panel">
@@ -155,7 +128,7 @@
           </a>
         </li>
         <li>
-          <a href="/cn/faq">
+          <a href="/cn/faq.html">
             FAQ
           </a>
         </li>
@@ -236,7 +209,7 @@
           <a href="/playground.html" data-lang="en">English</a>
         </li>
         <li>
-          <a href="/cn/playground.html" data-lang="cn">中文</a>
+          <a href="/cn/playground.html" data-lang="zh-cn">中文</a>
         </li>
       </ul>
     </div>



Mime
View raw message