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

dzamo pushed a commit to branch gh-pages
in repository https://gitbox.apache.org/repos/asf/drill.git


The following commit(s) were added to refs/heads/gh-pages by this push:
     new ae8fd32  Add support for multilingual "site" pages (in the root dir).
ae8fd32 is described below

commit ae8fd32ae57c6e0caf4967fb544bcccd76bc70a2
Author: James Turton <[email protected]>
AuthorDate: Mon Jun 28 11:29:36 2021 +0200

    Add support for multilingual "site" pages (in the root dir).
---
 README.md                                          | 17 ++--
 _data/docs.json                                    | 94 +++++++++++-----------
 .../050-aggregate-and-aggregate-statistical.md     | 11 ++-
 _tools/createdatadocs.py                           |  1 +
 index.html                                         |  1 +
 index.html => zh/index.html                        |  4 +-
 6 files changed, 69 insertions(+), 59 deletions(-)

diff --git a/README.md b/README.md
index a719f03..f17b80d 100644
--- a/README.md
+++ b/README.md
@@ -128,18 +128,21 @@ redirect_to:
 ```
 # Multilingual
 
-Multilingual support was added to the docs section of the website in June 2021 
using the polyglot Jekyll plugin.  The fallback language is set to English 
which means that when a translated page is not available the English version 
will be shown.
+Multilingual support was added to the docs section of the website in June 2021 
using the polyglot Jekyll plugin.  The fallback language is set to English 
which means that when a translated page is not available the English version 
will be shown.   This means that a language which is incompletely translated is 
still deployable with no adverse effects.
 
 ## Add a new language
 
-1. Add the two-letter language code to the `languages` property in _config.yml.
-2. Add a subdirectory with name equal to the language code under _docs/.
+1. Add the two-letter language code (*lang-code* forthwith) to the `languages` 
property in _config.yml.
+2. Add a /*lang-code* subdirectory to the root directory.
+3. Add a *lang-code* subdirectory to each collection that will be translated, 
e.g. _docs/*lang-code*.
 
-## Add translated documentation
+## Add translated site pages
 
-1. Incrementally add translated pages to the relevant language subdirectory 
under _docs/ by replicating the path structure under _docs/en.
-2. In the "front matter" at the top of each new page, translate both `title` 
and `parent` but leave the `slug` the same as the English page and set `lang` 
to the language code you are writing in.
-3. A language which is incompletely translated is still deployable with no 
adverse effects (see the remark concerning English fallback above).
+The English versions of "site" pages such as index.html are stored in the root 
directory.  Create corresponding translated pages under /*lang-code* in which 
you set `lang` in the front matter to *lang-code* and leave the `permalink` the 
same as the English page.
+
+## Add translated collection pages
+
+The English versions of "collection" pages such as the markdown under _docs/ 
are stored in an en/ subdirectory of the collection root.  Create corresponding 
translated pages in the collection under /*lang-code* in which you translate 
both `title` and `parent` in the front matter but leave the `slug` the same as 
the English page and set `lang` to *lang-code*.
 
 # Compiling the Website
 
diff --git a/_data/docs.json b/_data/docs.json
index 86aec3a..8389fa5 100644
--- a/_data/docs.json
+++ b/_data/docs.json
@@ -25094,7 +25094,7 @@
                 "next_title": "Architecture Introduction",
                 "next_url": "/docs/architecture-introduction/",
                 "parent": "",
-                "previous_title": "\u4e3a\u4ec0\u4e48\u94bb (Why Drill)",
+                "previous_title": "\u4e3a\u4ec0\u4e48\u9009\u62e9 Drill",
                 "previous_url": "/docs/why-drill/",
                 "relative_path": "_docs/en/020-architecture.md",
                 "title": "Architecture",
@@ -41289,86 +41289,86 @@
                 "title": "XML Format Plugin",
                 "url": "/docs/xml-format-plugin/"
             },
-            "\u4e3a\u4ec0\u4e48\u94bb (Why Drill)": {
+            "\u4e3a\u4ec0\u4e48\u9009\u62e9 Drill": {
                 "breadcrumbs": [
                     {
-                        "title": "\u5f00\u59cb (Getting Started)",
+                        "title": "\u65b0\u624b\u5f00\u59cb",
                         "url": "/docs/getting-started/"
                     }
                 ],
                 "children": [],
                 "next_title": "Architecture",
                 "next_url": "/docs/architecture/",
-                "parent": "\u5f00\u59cb (Getting Started)",
-                "previous_title": "\u94bb\u5934\u4ecb\u7ecd (Drill 
Introduction)",
+                "parent": "\u65b0\u624b\u5f00\u59cb",
+                "previous_title": "\u4ec0\u4e48\u662f Drill",
                 "previous_url": "/docs/drill-introduction/",
                 "relative_path": "_docs/zh/getting-started/020-why-drill.md",
-                "title": "\u4e3a\u4ec0\u4e48\u94bb (Why Drill)",
+                "title": "\u4e3a\u4ec0\u4e48\u9009\u62e9 Drill",
                 "url": "/docs/why-drill/"
             },
-            "\u5f00\u59cb (Getting Started)": {
+            "\u4ec0\u4e48\u662f Drill": {
+                "breadcrumbs": [
+                    {
+                        "title": "\u65b0\u624b\u5f00\u59cb",
+                        "url": "/docs/getting-started/"
+                    }
+                ],
+                "children": [],
+                "next_title": "\u4e3a\u4ec0\u4e48\u9009\u62e9 Drill",
+                "next_url": "/docs/why-drill/",
+                "parent": "\u65b0\u624b\u5f00\u59cb",
+                "previous_title": "\u65b0\u624b\u5f00\u59cb",
+                "previous_url": "/docs/getting-started/",
+                "relative_path": 
"_docs/zh/getting-started/010-drill-introduction.md",
+                "title": "\u4ec0\u4e48\u662f Drill",
+                "url": "/docs/drill-introduction/"
+            },
+            "\u65b0\u624b\u5f00\u59cb": {
                 "breadcrumbs": [],
                 "children": [
                     {
                         "breadcrumbs": [
                             {
-                                "title": "\u5f00\u59cb (Getting Started)",
+                                "title": "\u65b0\u624b\u5f00\u59cb",
                                 "url": "/docs/getting-started/"
                             }
                         ],
                         "children": [],
-                        "next_title": "\u4e3a\u4ec0\u4e48\u94bb (Why Drill)",
+                        "next_title": "\u4e3a\u4ec0\u4e48\u9009\u62e9 Drill",
                         "next_url": "/docs/why-drill/",
-                        "parent": "\u5f00\u59cb (Getting Started)",
-                        "previous_title": "\u5f00\u59cb (Getting Started)",
+                        "parent": "\u65b0\u624b\u5f00\u59cb",
+                        "previous_title": "\u65b0\u624b\u5f00\u59cb",
                         "previous_url": "/docs/getting-started/",
                         "relative_path": 
"_docs/zh/getting-started/010-drill-introduction.md",
-                        "title": "\u94bb\u5934\u4ecb\u7ecd (Drill 
Introduction)",
+                        "title": "\u4ec0\u4e48\u662f Drill",
                         "url": "/docs/drill-introduction/"
                     },
                     {
                         "breadcrumbs": [
                             {
-                                "title": "\u5f00\u59cb (Getting Started)",
+                                "title": "\u65b0\u624b\u5f00\u59cb",
                                 "url": "/docs/getting-started/"
                             }
                         ],
                         "children": [],
                         "next_title": "Architecture",
                         "next_url": "/docs/architecture/",
-                        "parent": "\u5f00\u59cb (Getting Started)",
-                        "previous_title": "\u94bb\u5934\u4ecb\u7ecd (Drill 
Introduction)",
+                        "parent": "\u65b0\u624b\u5f00\u59cb",
+                        "previous_title": "\u4ec0\u4e48\u662f Drill",
                         "previous_url": "/docs/drill-introduction/",
                         "relative_path": 
"_docs/zh/getting-started/020-why-drill.md",
-                        "title": "\u4e3a\u4ec0\u4e48\u94bb (Why Drill)",
+                        "title": "\u4e3a\u4ec0\u4e48\u9009\u62e9 Drill",
                         "url": "/docs/why-drill/"
                     }
                 ],
-                "next_title": "\u94bb\u5934\u4ecb\u7ecd (Drill Introduction)",
+                "next_title": "\u4ec0\u4e48\u662f Drill",
                 "next_url": "/docs/drill-introduction/",
                 "parent": "",
                 "previous_title": "",
                 "previous_url": "",
                 "relative_path": "_docs/zh/010-getting-started.md",
-                "title": "\u5f00\u59cb (Getting Started)",
+                "title": "\u65b0\u624b\u5f00\u59cb",
                 "url": "/docs/getting-started/"
-            },
-            "\u94bb\u5934\u4ecb\u7ecd (Drill Introduction)": {
-                "breadcrumbs": [
-                    {
-                        "title": "\u5f00\u59cb (Getting Started)",
-                        "url": "/docs/getting-started/"
-                    }
-                ],
-                "children": [],
-                "next_title": "\u4e3a\u4ec0\u4e48\u94bb (Why Drill)",
-                "next_url": "/docs/why-drill/",
-                "parent": "\u5f00\u59cb (Getting Started)",
-                "previous_title": "\u5f00\u59cb (Getting Started)",
-                "previous_url": "/docs/getting-started/",
-                "relative_path": 
"_docs/zh/getting-started/010-drill-introduction.md",
-                "title": "\u94bb\u5934\u4ecb\u7ecd (Drill Introduction)",
-                "url": "/docs/drill-introduction/"
             }
         },
         "hierarchy": [
@@ -41378,45 +41378,45 @@
                     {
                         "breadcrumbs": [
                             {
-                                "title": "\u5f00\u59cb (Getting Started)",
+                                "title": "\u65b0\u624b\u5f00\u59cb",
                                 "url": "/docs/getting-started/"
                             }
                         ],
                         "children": [],
-                        "next_title": "\u4e3a\u4ec0\u4e48\u94bb (Why Drill)",
+                        "next_title": "\u4e3a\u4ec0\u4e48\u9009\u62e9 Drill",
                         "next_url": "/docs/why-drill/",
-                        "parent": "\u5f00\u59cb (Getting Started)",
-                        "previous_title": "\u5f00\u59cb (Getting Started)",
+                        "parent": "\u65b0\u624b\u5f00\u59cb",
+                        "previous_title": "\u65b0\u624b\u5f00\u59cb",
                         "previous_url": "/docs/getting-started/",
                         "relative_path": 
"_docs/zh/getting-started/010-drill-introduction.md",
-                        "title": "\u94bb\u5934\u4ecb\u7ecd (Drill 
Introduction)",
+                        "title": "\u4ec0\u4e48\u662f Drill",
                         "url": "/docs/drill-introduction/"
                     },
                     {
                         "breadcrumbs": [
                             {
-                                "title": "\u5f00\u59cb (Getting Started)",
+                                "title": "\u65b0\u624b\u5f00\u59cb",
                                 "url": "/docs/getting-started/"
                             }
                         ],
                         "children": [],
                         "next_title": "Architecture",
                         "next_url": "/docs/architecture/",
-                        "parent": "\u5f00\u59cb (Getting Started)",
-                        "previous_title": "\u94bb\u5934\u4ecb\u7ecd (Drill 
Introduction)",
+                        "parent": "\u65b0\u624b\u5f00\u59cb",
+                        "previous_title": "\u4ec0\u4e48\u662f Drill",
                         "previous_url": "/docs/drill-introduction/",
                         "relative_path": 
"_docs/zh/getting-started/020-why-drill.md",
-                        "title": "\u4e3a\u4ec0\u4e48\u94bb (Why Drill)",
+                        "title": "\u4e3a\u4ec0\u4e48\u9009\u62e9 Drill",
                         "url": "/docs/why-drill/"
                     }
                 ],
-                "next_title": "\u94bb\u5934\u4ecb\u7ecd (Drill Introduction)",
+                "next_title": "\u4ec0\u4e48\u662f Drill",
                 "next_url": "/docs/drill-introduction/",
                 "parent": "",
                 "previous_title": "",
                 "previous_url": "",
                 "relative_path": "_docs/zh/010-getting-started.md",
-                "title": "\u5f00\u59cb (Getting Started)",
+                "title": "\u65b0\u624b\u5f00\u59cb",
                 "url": "/docs/getting-started/"
             },
             {
@@ -41494,7 +41494,7 @@
                 "next_title": "Architecture Introduction",
                 "next_url": "/docs/architecture-introduction/",
                 "parent": "",
-                "previous_title": "\u4e3a\u4ec0\u4e48\u94bb (Why Drill)",
+                "previous_title": "\u4e3a\u4ec0\u4e48\u9009\u62e9 Drill",
                 "previous_url": "/docs/why-drill/",
                 "relative_path": "_docs/en/020-architecture.md",
                 "title": "Architecture",
diff --git 
a/_docs/en/sql-reference/sql-functions/050-aggregate-and-aggregate-statistical.md
 
b/_docs/en/sql-reference/sql-functions/050-aggregate-and-aggregate-statistical.md
index 139ab82..6a199a5 100644
--- 
a/_docs/en/sql-reference/sql-functions/050-aggregate-and-aggregate-statistical.md
+++ 
b/_docs/en/sql-reference/sql-functions/050-aggregate-and-aggregate-statistical.md
@@ -1,6 +1,8 @@
-______________________________________________________________________
-
-## title: "Aggregate and Aggregate Statistical" slug: "Aggregate and Aggregate 
Statistical" parent: "SQL Functions"
+---
+title: "Aggregate and Aggregate Statistical"
+slug: "Aggregate and Aggregate Statistical"
+parent: "SQL Functions"
+---
 
 ## Aggregate Functions
 
@@ -254,7 +256,8 @@ SELECT COUNT(*) FROM . . .
   Returns the number of distinct values in the expression.
 - ALL expression\
   Returns the number of values of the specified expression.
-- - (asterisk) Returns the number of records in the table.
+- \* (asterisk)\
+-  Returns the number of records in the table.
 
 ### COUNT Examples
 
diff --git a/_tools/createdatadocs.py b/_tools/createdatadocs.py
index 2837acb..d541a5c 100755
--- a/_tools/createdatadocs.py
+++ b/_tools/createdatadocs.py
@@ -64,6 +64,7 @@ if __name__ == '__main__':
     for lang in langs:
         # the fallback language, en, ends up at _site/ rather than _site/en/
         input_path = f'_site/{lang if lang != "en" else "."}/data/index.html'
+        # input_path = f'_site/{lang}/data/index.html'
         output_path = '_data/docs.json'
 
         with open(input_path) as input_file:
diff --git a/index.html b/index.html
index 11e7391..75288d0 100644
--- a/index.html
+++ b/index.html
@@ -1,5 +1,6 @@
 ---
 layout: default
+permalink: /
 ---
 <link 
href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.min.css";
 rel="stylesheet" type="text/css"/>
 <link 
href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.5.4/slick.min.css";
 rel="stylesheet" type="text/css"/>
diff --git a/index.html b/zh/index.html
similarity index 99%
copy from index.html
copy to zh/index.html
index 11e7391..2851204 100644
--- a/index.html
+++ b/zh/index.html
@@ -1,5 +1,7 @@
 ---
 layout: default
+permalink: /
+lang: zh
 ---
 <link 
href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.min.css";
 rel="stylesheet" type="text/css"/>
 <link 
href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.5.4/slick.min.css";
 rel="stylesheet" type="text/css"/>
@@ -79,7 +81,7 @@ $(document).ready(function() {
     <tbody>
       <tr>
         <td class="ag">
-          <h1>Agility</h1>
+          <h1>敏捷</h1>
           <p>Get faster insights without the overhead (data loading, schema 
creation and maintenance, transformations, etc.)</p>
         </td>
         <td class="fl">

Reply via email to