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

jevans pushed a commit to branch v1.9.x
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/v1.9.x by this push:
     new 2bdd90c120 Fix medium blog integration. (#21009)
2bdd90c120 is described below

commit 2bdd90c1200eab51698396314eb99f0aab0612e9
Author: matherit <[email protected]>
AuthorDate: Thu Apr 28 12:32:33 2022 -0500

    Fix medium blog integration. (#21009)
---
 docs/static_site/Makefile                    |  5 ++++
 docs/static_site/src/_includes/head.html     | 14 ++++++++----
 docs/static_site/src/_layouts/home.html      | 24 +++++++++-----------
 docs/static_site/src/_sass/minima/_blog.scss | 34 ++++------------------------
 docs/static_site/src/pages/blog.html         | 28 +++++++++--------------
 5 files changed, 42 insertions(+), 63 deletions(-)

diff --git a/docs/static_site/Makefile b/docs/static_site/Makefile
index a974e12602..073b8c28e0 100644
--- a/docs/static_site/Makefile
+++ b/docs/static_site/Makefile
@@ -20,6 +20,11 @@ all: html
 html:
        mkdir -p build
        wget -O src/assets/js/jquery-3.3.1.min.js 
https://code.jquery.com/jquery-3.3.1.min.js
+       wget -O src/assets/img/mxnet-icon.png 
https://raw.githubusercontent.com/dmlc/web-data/master/mxnet/image/mxnet-icon.png
+       wget -O src/assets/docsearch.min.css 
'https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css'
+       wget -O src/assets/js/docsearch.min.js 
'https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js'
+       wget -O src/assets/retainable.css 
https://www.twilik.com/assets/retainable/rss-embed/retainable.css
+       wget -O src/assets/js/retainable.js 
https://www.twilik.com/assets/retainable/rss-embed/retainable.js
        cd src && bundle install && JEKYLL_ENV=production bundle exec jekyll 
build --config _config_prod.yml -d ../build/html && cd ..
 
 
diff --git a/docs/static_site/src/_includes/head.html 
b/docs/static_site/src/_includes/head.html
index fb7822caaa..11264726e7 100644
--- a/docs/static_site/src/_includes/head.html
+++ b/docs/static_site/src/_includes/head.html
@@ -2,10 +2,15 @@
   <meta charset="utf-8">
   <meta http-equiv="X-UA-Compatible" content="IE=edge">
   <meta name="viewport" content="width=device-width, initial-scale=1">
-  <link 
href="https://raw.githubusercontent.com/dmlc/web-data/master/mxnet/image/mxnet-icon.png";
 rel="icon" type="image/png">
+  <link href="{{ "/assets/img/mxnet-icon.png" | relative_url }}" rel="icon" 
type="image/png">
   {%- seo -%}
-  <script src="https://medium-widget.pixelpoint.io/widget.js";></script>
-  <link rel="stylesheet" 
href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css"; />
+  {%- if jekyll.environment == 'production' -%}
+    <link rel="stylesheet" href="{{ "/assets/docsearch.min.css" | relative_url 
}}" />
+    <link rel="stylesheet" href="{{ "/assets/retainable.css" | relative_url 
}}" />
+  {%- else -%}
+    <link rel="stylesheet" 
href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css"; />
+    <link rel="stylesheet" 
href="https://www.twilik.com/assets/retainable/rss-embed/retainable.css"; />
+  {%- endif -%}
   <link rel="stylesheet" href="{{ "/assets/main.css" | relative_url }}">
   {%- feed_meta -%}
   {%- if jekyll.environment == 'production' and site.google_analytics -%}
@@ -13,10 +18,11 @@
   {%- endif -%}
   {%- if jekyll.environment == 'production' -%}
     <script src="{{'/assets/js/jquery-3.3.1.min.js'|relative_url}}"></script>
+    <script src="{{ "/assets/js/docsearch.min.js" | relative_url }}"></script>
   {%- else -%}
     <script src="https://code.jquery.com/jquery-3.3.1.min.js"; 
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" 
crossorigin="anonymous"></script>
+    <script 
src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"; 
defer></script>
   {%- endif -%}
-  <script 
src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"; 
defer></script>
   <script src="{{'/assets/js/globalSearch.js'|relative_url}}" defer></script>
   <script src="{{'/assets/js/clipboard.js'|relative_url}}" defer></script>
   <script src="{{'/assets/js/copycode.js'|relative_url}}" defer></script>
diff --git a/docs/static_site/src/_layouts/home.html 
b/docs/static_site/src/_layouts/home.html
index 430c03f96a..00286e65fa 100644
--- a/docs/static_site/src/_layouts/home.html
+++ b/docs/static_site/src/_layouts/home.html
@@ -131,19 +131,11 @@
                 </div>
             </div>
 
-            <div id="medium-widget"></div>
-            <script>
-                MediumWidget.Init({renderTo: '#medium-widget',
-                    params: {
-                        "resource": "https://medium.com/apache-mxnet";,
-                        "postsPerLine": 3,
-                        "limit": 3,
-                        "picture": "big",
-                        "fields": ["description", "claps", "publishAt"],
-                        "ratio": "landscape"
-                    }
-                })
-            </script>
+            <div class="row" id="retainable-rss-embed" 
data-rss="https://medium.com/feed/apache-mxnet";
+                data-maxcols="3" data-layout="slider" data-poststyle="external"
+                data-readmore="Read more.." data-buttonclass="btn btn-primary">
+            </div>
+
         </div>
     </div>
 
@@ -182,6 +174,12 @@
 
 {%- include footer.html -%}
 
+{%- if jekyll.environment == 'production' -%}
+  <script src="{{ "/assets/js/retainable.js" | relative_url }}"></script>
+{%- else -%}
+  <script 
src="https://www.twilik.com/assets/retainable/rss-embed/retainable.js";></script>
+{%- endif -%}
+
 </body>
 
 </html>
diff --git a/docs/static_site/src/_sass/minima/_blog.scss 
b/docs/static_site/src/_sass/minima/_blog.scss
index 9f14e316f4..2a38ca7222 100644
--- a/docs/static_site/src/_sass/minima/_blog.scss
+++ b/docs/static_site/src/_sass/minima/_blog.scss
@@ -15,37 +15,13 @@
  * specific language governing permissions and limitations
  * under the License. */
 
-.medium-widget-article__item {
-  transition: box-shadow 0.3s linear;
-
-  &:hover {
-    box-shadow: inset 0 -2px 0 0 $color-mxnet;
-    filter: none;
-    border-bottom: 1px white solid;
-
-    a.medium-widget-article__title {
-      color: orangered;
-    }
-  }
-
-  margin: 20px;
-  background-color: $grey-color-light;
-  padding: 0px;
-  border: 1px solid $grey-color-light
+.page-content-home div#rtb h2 {
+  font-size: 0.6em;
 }
 
-.medium-widget-article__title {
-  font-weight: 300;
-}
-
-.medium-widget-article__content {
-  padding: 15px;
-}
-
-@include media-query($on-palm) {
-  .medium-widget-article__row {
-    flex-direction: column;
-  }
+#rtb div.col-sm-4.rtb-col {
+       border: 1px solid $grey-color-light;
+       margin: 20px;
 }
 
 .blog-more {
diff --git a/docs/static_site/src/pages/blog.html 
b/docs/static_site/src/pages/blog.html
index 37e43a3fbf..407cb09c7e 100644
--- a/docs/static_site/src/pages/blog.html
+++ b/docs/static_site/src/pages/blog.html
@@ -34,24 +34,18 @@ action_url: https://medium.com/apache-mxnet
     </div>
 </div>
 
-<div id="medium-widget"></div>
-<script>
-
-    MediumWidget.Init({renderTo: '#medium-widget',
-        params: {
-            "resource": "https://medium.com/apache-mxnet";,
-            "postsPerLine": 3,
-            "limit": 9,
-            "picture": "big",
-            "fields": ["description", "claps", "publishAt"],
-            "ratio": "landscape"
-        }
-    })
-
-
-</script>
-
+<div class="row">
+        <div class="col-12" id="retainable-rss-embed" 
data-rss="https://medium.com/feed/apache-mxnet";
+            data-maxcols="3" data-layout="grid" data-poststyle="external" 
data-readmore="Read more..">
+       </div>
+</div>
 <div class="blog-more">
 <a style="margin-top:20px" href="https://medium.com/apache-mxnet"; class="btn 
btn-action">See All Blog Posts<span class="span-accented">›</span></a>
 
 </div>
+{%- if jekyll.environment == 'production' -%}
+  <script src="{{ "/assets/js/retainable.js" | relative_url }}"></script>
+{%- else -%}
+  <script 
src="https://www.twilik.com/assets/retainable/rss-embed/retainable.js";></script>
+{%- endif -%}
+

Reply via email to