You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by ki...@apache.org on 2021/01/10 08:31:34 UTC

[incubator-dolphinscheduler-website] branch master updated: Fix Apache check (#256)

This is an automated email from the ASF dual-hosted git repository.

kirs pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-dolphinscheduler-website.git


The following commit(s) were added to refs/heads/master by this push:
     new 3ade87a  Fix Apache check (#256)
3ade87a is described below

commit 3ade87a53b7fb4fa6b983f76aafec1b812e9c32f
Author: Shiwen Cheng <ch...@gmail.com>
AuthorDate: Sun Jan 10 16:31:28 2021 +0800

    Fix Apache check (#256)
    
    * update ejs
    
    * Revert "Modify the official website menu (#253)"
    
    This reverts commit 349d3f66f295772ed40424c0336f03eeb6aa3f5e.
    
    * remove dubbo image adn add favicon.ico
    
    * fix submenu in header
    
    * fix apache check in index.html
    
    * update peaceiris/actions-gh-pages
---
 .github/workflows/website.yml     |  10 +--
 gulpfile.js                       |   7 +-
 img/dubbo.ico                     | Bin 16958 -> 0 bytes
 img/dubbo_colorful.png            | Bin 11175 -> 0 bytes
 img/dubbo_gray.png                | Bin 1182 -> 0 bytes
 img/dubbo_white.png               | Bin 6283 -> 0 bytes
 img/favicon.ico                   | Bin 0 -> 4286 bytes
 package.json                      |   1 +
 redirect.ejs                      |   3 +-
 src/components/header/index.jsx   | 171 ++++----------------------------------
 src/components/header/index.scss  |  81 +++++-------------
 src/pages/blogDetail/index.md.jsx |   2 +-
 template.ejs                      |  44 +++++-----
 13 files changed, 73 insertions(+), 246 deletions(-)

diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml
index 069045b..c1163aa 100644
--- a/.github/workflows/website.yml
+++ b/.github/workflows/website.yml
@@ -18,10 +18,8 @@ jobs:
         mkdir dist && npm install && npm run build && cp -r sitemap.xml 404.html .asf.yaml index.html en-us zh-cn build img download dist/
 
     - name: Deploy
-      if: success()
-      uses: crazy-max/ghaction-github-pages@v2
+      uses: peaceiris/actions-gh-pages@v3
       with:
-        target_branch: asf-site
-        build_dir: ./dist
-      env:
-        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        github_token: ${{ secrets.GITHUB_TOKEN }}
+        publish_branch: asf-site
+        publish_dir: ./dist
diff --git a/gulpfile.js b/gulpfile.js
index bef7234..997a480 100755
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -3,7 +3,9 @@ const gulp = require('gulp');
 const gutil = require('gulp-util');
 const webpack = require('webpack');
 const opn = require('opn');
+const path = require('path');
 const WebpackDevServer = require('webpack-dev-server');
+const CopyWebpackPlugin = require('copy-webpack-plugin');
 const siteConfig = require('./site_config/site').default;
 const webpackConfig = require('./webpack.config.js');
 
@@ -43,7 +45,10 @@ gulp.task('webpack:build', callback => {
         NODE_ENV: JSON.stringify('production'),
       },
     }),
-    new webpack.optimize.UglifyJsPlugin()
+    new webpack.optimize.UglifyJsPlugin(),
+    new CopyWebpackPlugin([
+      { from: path.join(__dirname, siteConfig.defaultLanguage, 'index.html'), to: path.join(__dirname, 'index.html') },
+    ])
   );
 
   // run webpack
diff --git a/img/dubbo.ico b/img/dubbo.ico
deleted file mode 100755
index eedaf39..0000000
Binary files a/img/dubbo.ico and /dev/null differ
diff --git a/img/dubbo_colorful.png b/img/dubbo_colorful.png
deleted file mode 100755
index 23961c5..0000000
Binary files a/img/dubbo_colorful.png and /dev/null differ
diff --git a/img/dubbo_gray.png b/img/dubbo_gray.png
deleted file mode 100755
index 7a14a59..0000000
Binary files a/img/dubbo_gray.png and /dev/null differ
diff --git a/img/dubbo_white.png b/img/dubbo_white.png
deleted file mode 100755
index 8f46776..0000000
Binary files a/img/dubbo_white.png and /dev/null differ
diff --git a/img/favicon.ico b/img/favicon.ico
new file mode 100644
index 0000000..acf4cf7
Binary files /dev/null and b/img/favicon.ico differ
diff --git a/package.json b/package.json
index 133d52c..8c4e167 100644
--- a/package.json
+++ b/package.json
@@ -20,6 +20,7 @@
     "babel-preset-stage-0": "6.22.0",
     "babel-register": "^6.26.0",
     "compression-webpack-plugin": "^3.1.0",
+    "copy-webpack-plugin": "^4.6.0",
     "css-loader": "0.6.12",
     "docsite-ext": "1.4.1",
     "eslint": "^4.18.2",
diff --git a/redirect.ejs b/redirect.ejs
index 3cab04c..e48bb06 100755
--- a/redirect.ejs
+++ b/redirect.ejs
@@ -5,10 +5,11 @@
   <meta charset="UTF-8"/>
   <meta name="description" content="DolphinScheduler is a distributed and easy-to-extend visual DAG workflow scheduling system, dedicated to solving the complex dependencies in data processing, making the scheduling system out of the box for data processing."/>
   <meta name="keywords" content="DolphinScheduler Official Website,dolphinscheduler.apache.org"/>
+  <link rel="shortcut icon" href="<%= rootPath %>/img/favicon.ico"/>
 </head>
 <body>
   <script src="//cdn.jsdelivr.net/npm/js-cookie@2/src/js.cookie.min.js"></script>
-	<script>
+  <script>
     window.rootPath = '<%= rootPath %>';
     window.defaultLanguage = '<%= defaultLanguage %>';
     var lang = Cookies.get('docsite_language');
diff --git a/src/components/header/index.jsx b/src/components/header/index.jsx
index 8479dbf..0653e0b 100755
--- a/src/components/header/index.jsx
+++ b/src/components/header/index.jsx
@@ -56,7 +56,6 @@ class Header extends React.Component {
       inputVisible: false,
     };
   }
-
   componentDidMount() {
     if(localStorage.getItem("currents") == null) {
       this.setState({
@@ -147,7 +146,6 @@ class Header extends React.Component {
   render() {
     const { type, logo, onLanguageChange, currentKey } = this.props;
     const { menuBodyVisible, language, search, searchVisible } = this.state;
-    
     return (
       <header
         className={
@@ -213,166 +211,31 @@ class Header extends React.Component {
               src={type === 'primary' ? getLink('/img/system/menu_white.png') : getLink('/img/system/menu_gray.png')}
             />
             <div>
-              {/* {language==='zh-cn'? <Menu className={type === 'primary'? 'whiteClass': 'blackClass'} onClick={this.handleClick} selectedKeys={[this.state.current]} mode="horizontal">
-                <Menu.Item key='home'>
-                  <a href={getLink('/zh-cn/index.html')}>首页</a>
-                </Menu.Item>
-                <SubMenu
-                  title={
-                    <span className="submenu-title-wrapper">
-                      <a href={getLink('/zh-cn/docs/1.3.4/user_doc/quick-start.html')}>文档</a>
-                    </span>
-                  }
-                >
-                  <Menu.ItemGroup>
-                    <Menu.Item key='docs1' ><a href={getLink('http://'+window.location.host+'/zh-cn/docs/1.3.4/user_doc/quick-start.html')}>1.3.4(推荐)</a></Menu.Item>
-                    <Menu.Item key='docs2' ><a href={getLink('http://'+window.location.host+'/zh-cn/docs/1.3.3/user_doc/quick-start.html')}>1.3.3</a></Menu.Item>
-                    <Menu.Item key='docs3' ><a href={getLink('http://'+window.location.host+'zh-cn/docs/1.3.2/user_doc/quick-start.html')}>1.3.2</a></Menu.Item>
-                    <Menu.Item key='docs4' ><a href={getLink('http://'+window.location.host+'zh-cn/docs/1.3.1/user_doc/quick-start.html')}>1.3.1</a></Menu.Item>
-                    <Menu.Item key='docs5' ><a href={getLink('http://'+window.location.host+'zh-cn/docs/1.2.1/user_doc/quick-start.html')}>1.2.1</a></Menu.Item>
-                    <Menu.Item key='docs6' ><a href={getLink('http://'+window.location.host+'zh-cn/docs/1.2.0/user_doc/quick-start.html')}>1.2.0</a></Menu.Item>
-                    <Menu.Item key='docs7' ><a href={getLink('https://analysys.github.io/easyscheduler_docs_cn/')}>1.1.0(Not Apache Release)</a></Menu.Item>
-                  </Menu.ItemGroup>
-                </SubMenu>
-                <Menu.Item key='download'>
-                  <a href={getLink('/zh-cn/docs/release/download.html')}>下载</a>
-                </Menu.Item>
-                <Menu.Item key='blog'>
-                  <a href={getLink('/zh-cn/blog/index.html')}>博客</a>
-                </Menu.Item>
-                <Menu.Item key='development'>
-                  <a href={getLink('/zh-cn/docs/development/subscribe.html')}>开发者</a>
-                </Menu.Item>
-                <Menu.Item key='community'>
-                  <a href={getLink('/zh-cn/community/index.html')}>社区</a>
-                </Menu.Item>
-                <SubMenu
-                  title={
-                    <span className="submenu-title-wrapper">
-                      <a href={getLink('https://www.apache.org/')} target='_blank'>ASF</a>
-                    </span>
-                  }
-                >
-                  <Menu.ItemGroup>
-                    <Menu.Item key='Foundation' ><a href='https://www.apache.org/' target='_blank'>Foundation</a></Menu.Item>
-                    <Menu.Item key='License' ><a href='https://www.apache.org/licenses/' target='_blank'>License</a></Menu.Item>
-                    <Menu.Item key='Events' ><a href='https://www.apache.org/events/current-event' target='_blank'>Events</a></Menu.Item>
-                    <Menu.Item key='Security' ><a href='https://www.apache.org/security/' target='_blank'>Security</a></Menu.Item>
-                    <Menu.Item key='Sponsorship' ><a href='https://www.apache.org/foundation/sponsorship.html' target='_blank'>Sponsorship</a></Menu.Item>
-                    <Menu.Item key='Thanks' ><a href='https://www.apache.org/foundation/thanks.html' target='_blank'>Thanks</a></Menu.Item>
-                  </Menu.ItemGroup>
-                </SubMenu>
-              </Menu> : <Menu className={type === 'primary'? 'whiteClass': 'blackClass'} onClick={this.handleClick} selectedKeys={[this.state.current]} mode="horizontal">
-                <Menu.Item key='home'>
-                  <a href={getLink('/en-us/index.html')}>HOME</a>
-                </Menu.Item>
-                <SubMenu
+              <Menu className={type === 'primary'? 'whiteClass': 'blackClass'} onClick={this.handleClick} selectedKeys={[this.state.current]} mode="horizontal" forceSubMenuRender={true}>
+              {siteConfig[language].pageMenu.map(item => (
+                item.children ? <SubMenu
                   title={
                     <span className="submenu-title-wrapper">
-                      <a href={getLink('/en-us/docs/1.3.4/user_doc/quick-start.html')}>DOCS</a>
+                      <a href={getLink(item.link)} target={item.target || '_self'}>{item.text}</a>
+                      <ul style={{display: 'none'}}>
+                      {item.children.map(items => (
+                        <li key={items.key} ><a href={getLink(items.link)} target={items.target || '_self'}>{items.text}</a></li>
+                      ))}
+                      </ul>
                     </span>
                   }
                 >
                   <Menu.ItemGroup>
-                    <Menu.Item key='docs1' ><a href={getLink('http://'+window.location.host+'/en-us/docs/1.3.4/user_doc/quick-start.html')}>1.3.4(Recommend)</a></Menu.Item>
-                    <Menu.Item key='docs2' ><a href={getLink('http://'+window.location.host+'/en-us/docs/1.3.3/user_doc/quick-start.html')}>1.3.3</a></Menu.Item>
-                    <Menu.Item key='docs3' ><a href={getLink('http://'+window.location.host+'en-us/docs/1.3.2/user_doc/quick-start.html')}>1.3.2</a></Menu.Item>
-                    <Menu.Item key='docs4' ><a href={getLink('http://'+window.location.host+'en-us/docs/1.3.1/user_doc/quick-start.html')}>1.3.1</a></Menu.Item>
-                    <Menu.Item key='docs5' ><a href={getLink('http://'+window.location.host+'en-us/docs/1.2.1/user_doc/quick-start.html')}>1.2.1</a></Menu.Item>
-                    <Menu.Item key='docs6' ><a href={getLink('http://'+window.location.host+'en-us/docs/1.2.0/user_doc/quick-start.html')}>1.2.0</a></Menu.Item>
-                    <Menu.Item key='docs7' ><a href={getLink('http://'+window.location.host+'https://analysys.github.io/easyscheduler_docs_cn/')}>1.1.0(Not Apache Release)</a></Menu.Item>
+                  {item.children.map(items => (
+                    <Menu.Item key={items.key} ><a href={getLink(items.link)} target={items.target || '_self'}>{items.text}</a></Menu.Item>
+                  ))}
                   </Menu.ItemGroup>
-                </SubMenu>
-                <Menu.Item key='download'>
-                  <a href={getLink('/en-us/docs/release/download.html')}>DOWNLOAD</a>
-                </Menu.Item>
-                <Menu.Item key='blog'>
-                  <a href={getLink('/en-us/blog/index.html')}>BLOG</a>
-                </Menu.Item>
-                <Menu.Item key='development'>
-                  <a href={getLink('/en-us/docs/development/subscribe.html')}>DEVELOPMENT</a>
-                </Menu.Item>
-                <Menu.Item key='community'>
-                  <a href={getLink('/en-us/community/index.html')}>COMMUNITY</a>
+                </SubMenu> : <Menu.Item key={item.key}>
+                  <a href={getLink(item.link)} target={item.target || '_self'}>{item.text}</a>
                 </Menu.Item>
-                <SubMenu
-                  title={
-                    <span className="submenu-title-wrapper">
-                      <a href={getLink('https://www.apache.org/')} target='_blank'>ASF</a>
-                    </span>
-                  }
-                >
-                  <Menu.ItemGroup>
-                    <Menu.Item key='Foundation' ><a href='https://www.apache.org/' target='_blank'>Foundation</a></Menu.Item>
-                    <Menu.Item key='License' ><a href='https://www.apache.org/licenses/' target='_blank'>License</a></Menu.Item>
-                    <Menu.Item key='Events' ><a href='https://www.apache.org/events/current-event' target='_blank'>Events</a></Menu.Item>
-                    <Menu.Item key='Security' ><a href='https://www.apache.org/security/' target='_blank'>Security</a></Menu.Item>
-                    <Menu.Item key='Sponsorship' ><a href='https://www.apache.org/foundation/sponsorship.html' target='_blank'>Sponsorship</a></Menu.Item>
-                    <Menu.Item key='Thanks' ><a href='https://www.apache.org/foundation/thanks.html' target='_blank'>Thanks</a></Menu.Item>
-                  </Menu.ItemGroup>
-                </SubMenu>
-              </Menu>} */}
-              {language==='zh-cn'?
-              <ul className="nav">
-                <li><a href={getLink('/zh-cn/index.html')}>首页</a></li>
-                <li>
-                  <a href={getLink('/zh-cn/docs/1.3.4/user_doc/quick-start.html')}>文档</a>
-                  <ul>
-                    <li><a href={getLink('/zh-cn/docs/1.3.4/user_doc/quick-start.html')}>1.3.4(推荐)</a></li>
-                    <li><a href={getLink('/zh-cn/docs/1.3.3/user_doc/quick-start.html')}>1.3.3</a></li>
-                    <li><a href={getLink('/zh-cn/docs/1.3.2/user_doc/quick-start.html')}>1.3.2</a></li>
-                    <li><a href={getLink('/zh-cn/docs/1.3.1/user_doc/quick-start.html')}>1.3.1</a></li>
-                    <li><a href={getLink('/zh-cn/docs/1.2.1/user_doc/quick-start.html')}>1.2.1</a></li>
-                    <li><a href={getLink('/zh-cn/docs/1.2.0/user_doc/quick-start.html')}>1.2.0</a></li>
-                    <li><a href="https://analysys.github.io/easyscheduler_docs_cn/">1.1.0(Not Apache Release)</a></li>
-                  </ul>
-                </li>
-                <li><a href={getLink('/zh-cn/docs/release/download.html')}>下载</a></li>
-                <li><a href={getLink('/zh-cn/blog/index.html')}>博客</a></li>
-                <li><a href={getLink('/zh-cn/docs/development/subscribe.html')}>开发者</a></li>
-                <li><a href={getLink('/zh-cn/community/index.html')}>社区</a></li>
-                <li>
-                  <a href="https://www.apache.org/" target='_blank'>ASF</a>
-                  <ul>
-                    <li><a href="https://www.apache.org/" target='_blank'>Foundation</a></li>
-                    <li><a href="https://www.apache.org/licenses/" target='_blank'>License</a></li>
-                    <li><a href="https://www.apache.org/events/current-event" target='_blank'>Events</a></li>
-                    <li><a href="https://www.apache.org/security/" target='_blank'>Security</a></li>
-                    <li><a href="https://www.apache.org/foundation/sponsorship.html" target='_blank'>Sponsorship</a></li>
-                    <li><a href="https://www.apache.org/foundation/thanks.html" target='_blank'>Thanks</a></li>
-                  </ul>
-                </li>
-              </ul>: <ul className="nav">
-                <li><a href={getLink('/en-us/index.html')}>HOME</a></li>
-                <li>
-                  <a href={getLink('/en-us/docs/1.3.4/user_doc/quick-start.html')}>DOCS</a>
-                  <ul>
-                    <li><a href={getLink('/en-us/docs/1.3.4/user_doc/quick-start.html')}>1.3.4(Recommend)</a></li>
-                    <li><a href={getLink('/en-us/docs/1.3.3/user_doc/quick-start.html')}>1.3.3</a></li>
-                    <li><a href={getLink('/en-us/docs/1.3.2/user_doc/quick-start.html')}>1.3.2</a></li>
-                    <li><a href={getLink('/en-us/docs/1.3.1/user_doc/quick-start.html')}>1.3.1</a></li>
-                    <li><a href={getLink('/en-us/docs/1.2.1/user_doc/quick-start.html')}>1.2.1</a></li>
-                    <li><a href={getLink('/en-us/docs/1.2.0/user_doc/quick-start.html')}>1.2.0</a></li>
-                    <li><a href="https://analysys.github.io/easyscheduler_docs_cn/">1.1.0(Not Apache Release)</a></li>
-                  </ul>
-                </li>
-                <li><a href={getLink('/en-us/docs/release/download.html')}>DOWNLOAD</a></li>
-                <li><a href={getLink('/en-us/blog/index.html')}>BLOG</a></li>
-                <li><a href={getLink('/en-us/docs/development/subscribe.html')}>DEVELOPMENT</a></li>
-                <li><a href={getLink('/en-us/community/index.html')}>COMMUNITY</a></li>
-                <li>
-                  <a href="https://www.apache.org/" target='_blank'>ASF</a>
-                  <ul>
-                    <li><a href="https://www.apache.org/" target='_blank'>Foundation</a></li>
-                    <li><a href="https://www.apache.org/licenses/" target='_blank'>License</a></li>
-                    <li><a href="https://www.apache.org/events/current-event" target='_blank'>Events</a></li>
-                    <li><a href="https://www.apache.org/security/" target='_blank'>Security</a></li>
-                    <li><a href="https://www.apache.org/foundation/sponsorship.html" target='_blank'>Sponsorship</a></li>
-                    <li><a href="https://www.apache.org/foundation/thanks.html" target='_blank'>Thanks</a></li>
-                  </ul>
-                </li>
-              </ul>}
-          </div>
+                ))}
+              </Menu>
+            </div>
           </div>
         </div>
       </header>
diff --git a/src/components/header/index.scss b/src/components/header/index.scss
index 0127591..bf84c2d 100755
--- a/src/components/header/index.scss
+++ b/src/components/header/index.scss
@@ -45,6 +45,14 @@
         cursor: pointer;
       }
     }
+    ul {
+      padding: 0;
+      margin: 0;
+    }
+    li {
+      display: inline-block;
+      margin-right: 20px;
+    }
     .menu-item {
       font-family: Avenir-Heavy;
       font-size: 14px;
@@ -233,66 +241,6 @@
   }
 }
 
-.nav {
-  margin-top: -12px;
-  height: 60px;
-  line-height: 60px;
-  padding:0;
-  list-style-type:none;
-  float:left;
-  a:hover {
-    color:#1890ff!important;
-  }
-  ul {
-    margin:0;
-    padding:0;
-    list-style-type:none;
-    float:left;
-    a:hover {
-      color:#1890ff!important;
-    }
-  }
-  li {
-    float:left;
-    width:120px;
-    text-align: center;
-    ul {
-      width:150px;
-      position:absolute;
-      left:-99999px;
-      background-color:#fff;
-    }
-    li {
-      float:none;
-      width: 150px;
-      height: 45px;
-      line-height: 45px;
-      a {
-        border-left:0;
-        border-right:0;
-      }
-    }
-  }
-  a {
-    display:block;
-    color:#333;
-    text-decoration:none;
-    padding:5px 10px;
-  }
-  li:last-child {
-    a {
-      border-right:0;
-      border-bottom:0;
-    }
-  }
-  li:hover {
-    ul {
-      left:auto;
-    }
-  }
-}
-  
-
 @media screen and (max-width: $mobileWidth) {
   .header-container {
     .header-body {
@@ -325,7 +273,20 @@
           display: list-item;
           padding-left: 30px;
           list-style: none;
+          line-height: 40px;
           margin-right: 20px;
+          a {
+            color: #333;
+            display: inline-block;
+            width: 100%;
+          }
+          &:hover {
+            background: $endColor;
+            a {
+              color: #fff;
+              opacity: 1;
+            }
+          }
         }
         .menu-item-primary-active, .menu-item-normal-active {
           background: $endColor;
diff --git a/src/pages/blogDetail/index.md.jsx b/src/pages/blogDetail/index.md.jsx
index ad3ba24..52a588b 100755
--- a/src/pages/blogDetail/index.md.jsx
+++ b/src/pages/blogDetail/index.md.jsx
@@ -24,7 +24,7 @@ class BlogDetail extends Md2Html(Language) {
           ref={(node) => { this.markdownContainer = node; }}
           dangerouslySetInnerHTML={{ __html }}
         />
-        <Footer logo="/img/dubbo_gray.png" language={language} />
+        <Footer logo="/img/ds_gray.svg" language={language} />
       </div>
     );
   }
diff --git a/template.ejs b/template.ejs
index 15e2353..fe89de2 100755
--- a/template.ejs
+++ b/template.ejs
@@ -1,30 +1,28 @@
 <!DOCTYPE html>
 <html lang="en">
-
 <head>
-	<meta charset="UTF-8">
-	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
-	<meta name="keywords" content="<%= keywords %>" />
-	<meta name="description" content="<%= description %>" />
-	<!-- 网页标签标题 -->
-	<title><%= title %></title>
-	<link rel="shortcut icon" href="<%= rootPath %>/img/docsite.ico"/>
-	<link rel="stylesheet" href="<%= rootPath %>/build/<%= page %>.css" />
+  <meta charset="UTF-8">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
+  <meta name="keywords" content="<%= keywords %>" />
+  <meta name="description" content="<%= description %>" />
+  <title><%= title %></title>
+  <link rel="shortcut icon" href="<%= rootPath %>/img/favicon.ico"/>
+  <link rel="stylesheet" href="<%= rootPath %>/build/<%= page %>.css" />
 </head>
 <body>
-	<div id="root"><%- __html %></div>
-	<script src="https://f.alicdn.com/react/15.4.1/react-with-addons.min.js"></script>
-	<script src="https://f.alicdn.com/react/15.4.1/react-dom.min.js"></script>
-	<script>window.rootPath = '<%= rootPath %>';</script>
-	<script src="<%= rootPath %>/build/<%= page %>.js"></script>
-	<script>
-	  var _hmt = _hmt || [];
-	  (function() {
-		var hm = document.createElement("script");
-		hm.src = "https://hm.baidu.com/hm.js?4e7b4b400dd31fa015018a435c64d06f";
-		var s = document.getElementsByTagName("script")[0];
-		s.parentNode.insertBefore(hm, s);
-	  })();
-	</script>
+  <div id="root"><%- __html %></div>
+  <script src="https://f.alicdn.com/react/15.4.1/react-with-addons.min.js"></script>
+  <script src="https://f.alicdn.com/react/15.4.1/react-dom.min.js"></script>
+  <script>window.rootPath = '<%= rootPath %>';</script>
+  <script src="<%= rootPath %>/build/<%= page %>.js"></script>
+  <script>
+    var _hmt = _hmt || [];
+    (function() {
+      var hm = document.createElement("script");
+      hm.src = "https://hm.baidu.com/hm.js?4e7b4b400dd31fa015018a435c64d06f";
+      var s = document.getElementsByTagName("script")[0];
+      s.parentNode.insertBefore(hm, s);
+    })();
+  </script>
 </body>
 </html>
\ No newline at end of file