You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by hu...@apache.org on 2018/07/26 10:16:07 UTC

[incubator-dubbo-website] branch asf-site updated: Add star icon && optimize for build (#59)

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

huxing pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo-website.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new c248eab  Add star icon && optimize for build (#59)
c248eab is described below

commit c248eab6c402c7117e25394bc16634d98173b4f9
Author: chenliandong <li...@alibaba-inc.com>
AuthorDate: Thu Jul 26 18:16:02 2018 +0800

    Add star icon && optimize for build (#59)
---
 index.html               |  4 +---
 src/pages/home/index.jsx |  3 +++
 webpack.config.js        | 13 ++-----------
 3 files changed, 6 insertions(+), 14 deletions(-)

diff --git a/index.html b/index.html
index 5d0c5b5..9947324 100644
--- a/index.html
+++ b/index.html
@@ -8,13 +8,10 @@
 	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
 	<!-- 网页标签ico -->
 	<link rel="icon" href="./img/dubbo.ico">
-	<link type="text/css" rel="stylesheet" href="./build/page.css" />
 </head>
 
 <body>
 	<div id="root"></div>
-	<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.12.0/build/highlight.min.js"></script>
-	<script src="https://cdn.jsdelivr.net/npm/markdown-it@8.3.1/dist/markdown-it.min.js"></script>
 	<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 src="https://cdn.jsdelivr.net/npm/react-router-dom@4.2.2/umd/react-router-dom.min.js"></script>
@@ -29,6 +26,7 @@
 
 		gtag('config', 'UA-112489517-1');
 	</script>
+	<script async defer src="https://buttons.github.io/buttons.js"></script>
 </body>
 
 </html>
\ No newline at end of file
diff --git a/src/pages/home/index.jsx b/src/pages/home/index.jsx
index e553193..7bb1066 100644
--- a/src/pages/home/index.jsx
+++ b/src/pages/home/index.jsx
@@ -69,6 +69,9 @@ class Home extends Language {
               <img src="./img/incubating.svg" />
             </div>
             <p className="product-desc">{dataSource.brand.briefIntroduction}</p>
+            <p style={{ marignTop: 20, height: 28 }}>
+              <a className="github-button" href="https://github.com/apache/incubator-dubbo" data-size="large" data-show-count="true" aria-label="Star apache/incubator-dubbo on GitHub">Star</a>
+            </p>
             <div className="button-area">
               <Link className="button" to={dataSource.brand.button.link}>{dataSource.brand.button.text}</Link>
             </div>
diff --git a/webpack.config.js b/webpack.config.js
index 0734b04..d42e76e 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -1,4 +1,3 @@
-const ExtractTextPlugin = require('extract-text-webpack-plugin');
 const path = require('path');
 const webpack = require('webpack');
 
@@ -16,8 +15,6 @@ module.exports = {
   externals: {
     react: 'React',
     'react-dom': 'ReactDOM',
-    'highlight.js': 'hljs',
-    'markdown-it': 'markdownit',
     'react-router-dom': 'ReactRouterDOM',
   },
   module: {
@@ -28,13 +25,8 @@ module.exports = {
         use: 'babel-loader',
       },
       {
-        test: /\.scss$/,
-        loader: ExtractTextPlugin.extract({ fallback: 'style-loader', use: ['raw-loader', 'sass-loader'] }),
-      },
-      {
-        test: /\.css$/,
-        // exclude: /node_modules/,
-        loader: ExtractTextPlugin.extract({ fallback: 'style-loader', use: 'raw-loader' }),
+        test: /\.(s)?css$/,
+        use: ['style-loader', 'raw-loader', 'sass-loader'],
       },
       {
         test: /\.json?$/,
@@ -49,6 +41,5 @@ module.exports = {
   plugins: [
     new webpack.NoEmitOnErrorsPlugin(),
     new webpack.optimize.OccurrenceOrderPlugin(),
-    new ExtractTextPlugin('[name].css')
   ]
 };