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

dwysakowicz pushed a commit to branch release-1.12
in repository https://gitbox.apache.org/repos/asf/flink.git

commit 9d506717732484287ae0fd64271e60cc05f32630
Author: Dawid Wysakowicz <dwysakow...@apache.org>
AuthorDate: Wed Dec 9 14:25:12 2020 +0100

    [FLINK-20422] Remove site.baseurl from remaining .html templates
---
 docs/{_layouts/404_base.html => 404.zh.md}         | 23 ++++------------
 docs/_includes/sidenav.html                        | 16 +++++------
 docs/_layouts/404_base.html                        |  4 +--
 docs/_layouts/base.html                            | 16 +++++------
 docs/_layouts/plain.html                           |  2 +-
 .../404_base.html => search-results.zh.md}         | 31 ++++++++++------------
 6 files changed, 38 insertions(+), 54 deletions(-)

diff --git a/docs/_layouts/404_base.html b/docs/404.zh.md
similarity index 64%
copy from docs/_layouts/404_base.html
copy to docs/404.zh.md
index 9ad29b3..5a25bad 100644
--- a/docs/_layouts/404_base.html
+++ b/docs/404.zh.md
@@ -1,5 +1,7 @@
 ---
-layout: base
+title: "404"
+permalink: /404.html
+layout: 404_base
 ---
 <!--
 Licensed to the Apache Software Foundation (ASF) under one
@@ -20,20 +22,5 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<noscript>
-  <meta http-equiv="refresh" content="5; url=https:{{ site.baseurl }}">
-</noscript>
-<script type="text/javascript">
-  var documentationRootUrl = "https:{{ site.baseurl }}";
-  var timeout = "5000";
-  window.onload = function() {
-    setTimeout(doRedirect, timeout);
-  }
-  function doRedirect() {
-    window.location.href = documentationRootUrl;
-  }
-</script>
-
-<h1>{{ page.title }}</h1>
-
-{{ content }}
+The page you are looking for has been moved. This could be because of a recent 
reorganization of the
+documentation. Redirecting to [Documentation Home Page](/) in 5 seconds.
diff --git a/docs/_includes/sidenav.html b/docs/_includes/sidenav.html
index ed767f2..4528361 100644
--- a/docs/_includes/sidenav.html
+++ b/docs/_includes/sidenav.html
@@ -41,9 +41,9 @@ Extract the active nav IDs.
 {%- endfor -%}
 
 {%- if page.language == "en" -%}
-  {%- capture baseurl_i18n -%}{{ site.baseurl }}{%- endcapture -%}
+  {%- capture baseurl_i18n -%}{% link index.md %}{%- endcapture -%}
 {%- else if page.language == "zh" -%}
-  {%- capture baseurl_i18n -%}{{ site.baseurl }}/{{ page.language }}{%- 
endcapture -%}
+  {%- capture baseurl_i18n -%}{% link index.{{ page.language }}.md %}{%- 
endcapture -%}
 {%- endif -%}
 
 {%- comment -%}
@@ -80,7 +80,7 @@ level is determined by 'nav-pos'.
 {%- assign pos = 0 -%}
 
 <div class="sidenav-logo">
-  <p><a href="{{ baseurl_i18n }}/"><img class="bottom" alt="Apache Flink" 
src="{{ site.baseurl }}/page/img/navbar-brand-logo.jpg"></a> v{{ 
site.version_title }}</p>
+  <p><a href="{{ baseurl_i18n }}"><img class="bottom" alt="Apache Flink" 
src="{% link page/img/navbar-brand-logo.jpg %}"></a> v{{ site.version_title 
}}</p>
 </div>
 <ul id="sidenav">
 {%- for i in (1..10000) -%}
@@ -106,8 +106,8 @@ level is determined by 'nav-pos'.
     {%- endif -%}
 
     {%- capture title -%}{%- if this.nav-title -%}{{ this.nav-title }}{%- else 
-%}{{ this.title }}{%- endif -%}{%- endcapture -%}
-    {%- capture target -%}"{{ site.baseurl }}{{ this.url }}"{%- if active %} 
class="active"{%- endif -%}{%- endcapture -%}
-    {%- capture overview_target -%}"{{ site.baseurl }}{{ this.url }}"{%- if 
this.url == page.url -%} class="active"{%- endif -%}{%- endcapture -%}
+    {%- capture target -%}"{% link {{ this.path }} %}"{%- if active %} 
class="active"{%- endif -%}{%- endcapture -%}
+    {%- capture overview_target -%}"{% link {{ this.path }} %}"{%- if this.url 
== page.url -%} class="active"{%- endif -%}{%- endcapture -%}
 
     {% if this.section-break %}<hr class="section-break"></hr>{% endif -%}
 
@@ -145,7 +145,7 @@ level is determined by 'nav-pos'.
 </ul>
 
 <div class="sidenav-search-box">
-  <form class="navbar-form" role="search" 
action="{{site.baseurl}}/search-results.html">
+  <form class="navbar-form" role="search" action="{% link search-results.md 
%}">
     <div class="form-group">
       <input type="text" class="form-control" size="16px" name="q" 
placeholder="Search">
     </div>
@@ -173,11 +173,11 @@ level is determined by 'nav-pos'.
 <div class="sidenav-languages">
   {%- if page.is_default_language -%}
     <!-- link to the Chinese home page when current is blog page -->
-    <a href="{{ site.baseurl }}/zh{{ page.url }}">
+    <a href="{% link {{ page.path | replace: '.md', '.zh.md' }} %}">
       <button type="submit" class="btn btn-default">中文版</button>
     </a>
   {%- else -%}
-    <a href="{{ site.baseurl }}{{ page.url | remove_first: 'zh/' }}">
+    <a href="{% link {{ page.path | remove: '.zh' }} %}">
       <button type="submit" class="btn btn-default">English</button>
     </a>
   {%- endif %}
diff --git a/docs/_layouts/404_base.html b/docs/_layouts/404_base.html
index 9ad29b3..eae7918 100644
--- a/docs/_layouts/404_base.html
+++ b/docs/_layouts/404_base.html
@@ -21,10 +21,10 @@ under the License.
 -->
 
 <noscript>
-  <meta http-equiv="refresh" content="5; url=https:{{ site.baseurl }}">
+  <meta http-equiv="refresh" content="5; url={% link index.md %}">
 </noscript>
 <script type="text/javascript">
-  var documentationRootUrl = "https:{{ site.baseurl }}";
+  var documentationRootUrl = "{% link index.md %}";
   var timeout = "5000";
   window.onload = function() {
     setTimeout(doRedirect, timeout);
diff --git a/docs/_layouts/base.html b/docs/_layouts/base.html
index b0bf2f4..2549d7d7 100644
--- a/docs/_layouts/base.html
+++ b/docs/_layouts/base.html
@@ -24,16 +24,16 @@ under the License.
     <meta name="viewport" content="width=device-width, initial-scale=1">
     <!-- The above 3 meta tags *must* come first in the head; any other head 
content must come *after* these tags -->
     <title>Apache Flink {{ site.version_title }} Documentation: {{ page.title 
}}</title>
-    <link rel="shortcut icon" href="{{ site.baseurl }}/page/favicon.ico" 
type="image/x-icon">
-    <link rel="icon" href="{{ site.baseurl }}/page/favicon.ico" 
type="image/x-icon">
+    <link rel="shortcut icon" href="{% link page/favicon.ico %}" 
type="image/x-icon">
+    <link rel="icon" href="{% link /page/favicon.ico %}" type="image/x-icon">
     <link rel="canonical" href="{{ site.stable_baseurl }}{{ page.url | 
replace:'index.html',''}}">
 
     <!-- Bootstrap -->
     <link rel="stylesheet" 
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css";>
-    <link rel="stylesheet" href="{{ site.baseurl }}/page/css/flink.css">
-    <link rel="stylesheet" href="{{ site.baseurl }}/page/css/syntax.css">
-    <link rel="stylesheet" href="{{ site.baseurl }}/page/css/codetabs.css">
-    <link rel="stylesheet" href="{{ site.baseurl 
}}/page/font-awesome/css/font-awesome.min.css">
+    <link rel="stylesheet" href="{% link page/css/flink.css %}">
+    <link rel="stylesheet" href="{% link page/css/syntax.css %}">
+    <link rel="stylesheet" href="{% link page/css/codetabs.css %}">
+    <link rel="stylesheet" href="{% link 
page/font-awesome/css/font-awesome.min.css %}">
     {% if page.mathjax %}
     <script type="text/x-mathjax-config">
         MathJax.Hub.Config({
@@ -89,11 +89,11 @@ under the License.
     <script>var defaultCodeTab = "{{ page.code_tab }}";</script>
 
     <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
-    <script src="{{ site.baseurl }}/page/js/jquery.min.js"></script>
+    <script src="{% link page/js/jquery.min.js %}"></script>
     <!-- Include all compiled plugins (below), or include individual files as 
needed -->
     <script 
src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js";></script>
     <script 
src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/3.1.0/anchor.min.js";></script>
-    <script src="{{ site.baseurl }}/page/js/flink.js"></script>
+    <script src="{% link page/js/flink.js %}"></script>
 
     <!-- Google Analytics -->
     <script>
diff --git a/docs/_layouts/plain.html b/docs/_layouts/plain.html
index e639e55..bcde9f2 100644
--- a/docs/_layouts/plain.html
+++ b/docs/_layouts/plain.html
@@ -45,7 +45,7 @@ under the License.
   {%- if forloop.last == true %}
     <li class="active">{{ title }}</li>
   {%- elsif p.nav-show_overview %}
-    <li><a href="{{ site.baseurl }}{{ p.url }}">{{ title }}</a></li>
+    <li><a href="{% link {{ p.path }} %}">{{ title }}</a></li>
   {%- else %}
     <li>{{ title }}</li>
   {%- endif -%}
diff --git a/docs/_layouts/404_base.html b/docs/search-results.zh.md
similarity index 62%
copy from docs/_layouts/404_base.html
copy to docs/search-results.zh.md
index 9ad29b3..5d8de99 100644
--- a/docs/_layouts/404_base.html
+++ b/docs/search-results.zh.md
@@ -1,5 +1,5 @@
 ---
-layout: base
+title:  "Search Results"
 ---
 <!--
 Licensed to the Apache Software Foundation (ASF) under one
@@ -19,21 +19,18 @@ KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
 -->
-
-<noscript>
-  <meta http-equiv="refresh" content="5; url=https:{{ site.baseurl }}">
-</noscript>
-<script type="text/javascript">
-  var documentationRootUrl = "https:{{ site.baseurl }}";
-  var timeout = "5000";
-  window.onload = function() {
-    setTimeout(doRedirect, timeout);
-  }
-  function doRedirect() {
-    window.location.href = documentationRootUrl;
-  }
+<script>
+  (function() {
+    var cx = '000322205049649384055:qbxxlwnwoqs';
+    var gcse = document.createElement('script');
+    gcse.type = 'text/javascript';
+    gcse.async = true;
+    gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
+    var s = document.getElementsByTagName('script')[0];
+    s.parentNode.insertBefore(gcse, s);
+  })();
 </script>
+<!-- add the keyword flink to every search -->
+<gcse:search as_oq="flink"></gcse:search>
 
-<h1>{{ page.title }}</h1>
-
-{{ content }}
+{% top %}

Reply via email to