You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by qi...@apache.org on 2020/04/06 09:15:19 UTC

[incubator-iotdb] branch master updated: modify website (#988)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 7e8299d  modify website (#988)
7e8299d is described below

commit 7e8299d33087ff8d8effeac5ec980a359296ae42
Author: Sail <37...@users.noreply.github.com>
AuthorDate: Mon Apr 6 17:15:13 2020 +0800

    modify website (#988)
    
    * add website readme
---
 site/README-zh.md                 | 206 ++++++++++++++++++++++++++++++++++++++
 site/README.md                    | 173 +++++++++++++++++++++++++++-----
 site/src/main/.vuepress/config.js |  32 +++---
 3 files changed, 368 insertions(+), 43 deletions(-)

diff --git a/site/README-zh.md b/site/README-zh.md
new file mode 100644
index 0000000..d4112f9
--- /dev/null
+++ b/site/README-zh.md
@@ -0,0 +1,206 @@
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+    
+        http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+
+[TOC]
+
+# 网站说明
+
+## IoTDB 网址
+
+见 https://iotdb.apache.org/
+
+## 如何建立
+
+跑`mvn package-DskipTests` 
+
+## 如何调试
+
+当跑完 `mvn package-DskipTests`, 所有的源文档都会复制到target/vue-source目录下
+
+如果你想要调试:
+
+```
+# 在localhost:8080打开
+npm run dev
+
+# 在.vuepress/dist生成项目文件(html形式)
+npm run build
+```
+
+请记住,Git只能记录site / src的更改。
+目标文件夹中的所有更改将被Git忽略。
+
+## 手动部署
+
+跑`mvn package scm-publish:publish-scm`.
+
+Apache ID和密码是必须的
+
+## 常见问题
+
+如果你在MacOS遇到以下问题:
+
+> gyp: No Xcode or CLT version detected! 
+
+然后,安装Xcode的CommandLine: `sudo xcode-select --install`.
+如果您已安装并且仍然出现错误,则 `sudo xcode-select --reset`
+
+# 文档格式
+
+- 所有的md都会被编译成html,REDEME.md编译为index.html,xx.md编译为xx.html
+- md内标签必须有开头有结尾,比如\<tr>必须有\</tr>与之对应,而且是严格对应;如果文档中需要插入标签,比如List\<String>,可以加这个放入代码块中,也可以在**俩个**尖括号前加上\,如\<\\String\\>
+- 标签不能交叉嵌套,比如\<p>\<center>\</p>\</center>这是不允许的
+- 文章的一级标题就是该文档对应sidebar的标题,所以文档最大的章节标题就不需要了
+
+## 文档内添加vue组件
+
+将组件放在.vuepress/components目录下
+
+直接在md文件中使用\<组件名/>即可
+
+关于vue组件的使用教程https://cn.vuejs.org/v2/guide/components.html
+
+# 贡献文档
+
+- 修改已有文档:只需要对文档里的内容进行修改,不要修改文件名(修改文件名就需要到config.js修改)
+- 增加文档:将增加的文档放在自己想放的目录,记录下目录的链接路径,到.vuepress/config.js中修改
+
+# 修改config.js
+
+## head,base,title,description
+
+```js
+    head: [
+		["meta", {name: "Description", content: "Apache IoTDB: Time Series Database for IoT"}],
+        ["meta", {name: "Keywords", content: "TSDB, time series, time series database, IoTDB, IoT database, IoT data management,时序数据库, 时间序列管理, IoTDB, 物联网数据库, 实时数据库, 物联网数据管理, 物联网数据"}],
+        ["meta", {name: "baidu-site-verification", content: "wfKETzB3OT"}],
+        ["meta", {name: "google-site-verification", content: "mZWAoRY0yj_HAr-s47zHCGHzx5Ju-RVm5wDbPnwQYFo"}],
+      ],
+```
+
+额外的需要被注入到当前页面的 HTML `<head>` 中的标签,每个标签都可以以 `[tagName, { attrName: attrValue }, innerHTML?]` 的格式指定
+
+base:部署站点的基础路径,如果你想让你的网站部署到一个子路径下,你将需要设置它。
+
+title:网站的标题,它将会被用作所有页面标题的前缀,同时,默认主题下,它将显示在导航栏(navbar)上
+
+description:网站的描述,它将会以 `<meta>` 标签渲染到当前页面的 HTML 中。
+
+具体配置信息看 https://www.vuepress.cn/config/
+
+ ## locales
+
+```js
+	locales: {
+		'/': {
+		  lang: 'en-US', // 将会被设置为 <html> 的 lang 属性
+		  title: ' ',
+		  description: ' '
+		},
+		'/zh/': {
+		  lang: 'zh-CN',
+		  title: ' ',
+		  description: ' '
+		}
+	  },
+```
+
+表示/跳转英文链接,/zh/跳转中文链接。
+
+文件的存储结构如下,zh下必须与英文的一一对应
+
+```
+docs
+├─ Userguide
+├─ SystemDesign
+├─ Download
+│  └─ README.md
+├─ etc.
+└─ zh
+   ├─ Userguide
+   ├─ SystemDesign
+   └─ Download
+      └─ README.md
+   ├─ etc.
+```
+
+## 导航栏
+
+nav表示最顶端的导航栏,修改nav注意自己修改的中文还是英文版本
+
+其中title表示该nav其中一项的标题,items就是下拉列表
+
+![1585829024864](https://user-images.githubusercontent.com/37333508/78358190-57d8ad80-75e5-11ea-87cb-48da2eb5383a.png)
+
+```js
+			nav: [
+				 {
+					text: 'Document',
+					items: [
+						{ text: 'In progress', link: '/UserGuide/master/0-Get Started/1-QuickStart' },
+						{ text: 'V0.9.x', link: '/UserGuide/V0.9.x/0-Get Started/1-QuickStart' },
+					    { text: 'V0.8.x', link: '/UserGuide/V0.8.x/0-Get Started/1-QuickStart'},
+					]
+				  },
+```
+
+## 侧边栏
+
+最前面的是跳转链接,children是补充该文档的跳转链接
+
+**总的链接就是 该网站域名+指定的语言版本(/或/zh/)+sidebar的链接+children的链接**
+
+```js
+			sidebar: {
+				'sidebar的链接': [
+					{
+						title:'sidebar的标题',
+						collapsable: false,//这句表示默认不折叠,即一直保持打开状态
+                        children: [
+							'children的链接1',
+							'children的链接2',
+							'children的链接3'
+						]
+					},
+```
+
+关于sidebar其他属性配置,见vuepress教程https://www.vuepress.cn/zh/theme/default-theme-config.html#%E4%BE%A7%E8%BE%B9%E6%A0%8F
+
+如果觉得找到in progress较为麻烦,直接ctrl+F搜索**/UserGuide/master/**跳转到那一块,中文是**/zh/UserGuide/master/**
+
+![1585829139646](https://user-images.githubusercontent.com/37333508/78358128-42638380-75e5-11ea-84bd-76e3864f191e.png)
+
+```js
+			sidebar: {
+				'/UserGuide/master/': [
+					{
+						title:'User Guide(In progress)',
+						collapsable: false,
+					},
+					{
+						title: '0-Get Started',
+						children: [
+							'0-Get Started/1-QuickStart',
+							'0-Get Started/2-Frequently asked questions',
+							'0-Get Started/3-Publication'
+						]
+					},
+```
diff --git a/site/README.md b/site/README.md
index 4e47d8b..d5a6078 100644
--- a/site/README.md
+++ b/site/README.md
@@ -7,9 +7,9 @@
     to you under the Apache License, Version 2.0 (the
     "License"); you may not use this file except in compliance
     with the License.  You may obtain a copy of the License at
-
+    
         http://www.apache.org/licenses/LICENSE-2.0
-
+    
     Unless required by applicable law or agreed to in writing,
     software distributed under the License is distributed on an
     "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -19,7 +19,11 @@
 
 -->
 
-# IoTDB website
+[TOC]
+
+# Website description
+
+## IoTDB website
 
 [![Build Status](https://builds.apache.org/view/I/view/IoTDB/job/IoTDB%20Website/badge/icon)](https://builds.apache.org/view/I/view/IoTDB/job/IoTDB%20Website/)
 
@@ -27,18 +31,14 @@ See https://iotdb.apache.org/
 
 ## Build Setup
 
-run `mvn site -DskipTests` for:
-
-- get docs from the master branch and all lagecy docs remotely.
-- download node.js and npm;
-- run `npm install` and `npm run build`
-
+run `mvn package -DskipTests` 
 
 ## How to Debug
 
-after running `mvn site -DskipTests`, all source codes are copied into target/vue-source
+after running `mvn package -DskipTests`, all source codes are copied into target/vue-source
 
 then if you want to debug, just run 
+
 ```
 # serve with hot reload at localhost:8080
 npm run dev
@@ -53,26 +53,11 @@ All changes in the target folder will be ignored by Git.
 ## Deploy Manually
 
 run `mvn package scm-publish:publish-scm`.
- 
-Apache ID and passwored is needed.
-
-## Directory Structure
 
-```
-.
-├─ src/main
-│  ├─ README.md	       //Home
-│  └─ .vuepress
-│  │  └─ components    //Global vue template
-│  │  └─ public        //Store static files
-│  │  └─ config.js	   //Configuration
-│  └─ document         //document 
-│  └─ download         //download
-│  └─ ...              
-└─ package.json
-```
+Apache ID and passwored is needed.
 
 ## FAQ
+
 If you get an error on your MacOS:
 
 > gyp: No Xcode or CLT version detected! 
@@ -80,3 +65,137 @@ If you get an error on your MacOS:
 Then, install CommandLine of Xcode: `sudo xcode-select --install`.
 If you have installed and the error still occurs, then `sudo xcode-select --reset`
 
+# Document format
+
+- All mds will be compiled into html, REDEME.md will be compiled into index.html, and xx.md will be compiled into xx.html
+- The tags in .md must have a beginning and an end. For example, \<tr> must have a \</ tr> corresponding to it, and it is strictly corresponding; if you need to insert tags in the document, such as List \<String>, you can add this into the code block, You can also add \ before the two  angle brackets, such as \<\\String\\>
+- Tags cannot be cross-nested, such as \<p> \<center>\</p>\</center> This is not allowed
+- The first-level title of the article is the title of the sidebar of the document, so the largest chapter title of the document is not needed
+
+## Add vue component to the document
+
+Place the components in the .vuepress / components directory
+
+Use \<component/> directly in the md file
+
+Tutorial on the use of vue componentshttps://cn.vuejs.org/v2/guide/components.html
+
+# Contributing documents
+
+- Only modify existing documents: only need to modify the content of the document, do not modify the file name (change the file name to config.js)
+- Adding documents: Put the added documents in the directory where you put them together, record the link path of the directory, and modify it in .vuepress / config.js
+
+# Modify config.js
+
+Head, base, title, description, etc. need hardly be modified
+
+See specific configuration information https://www.vuepress.cn/config/
+
+ head,base,title,description
+
+```js
+    head: [
+		["meta", {name: "Description", content: "Apache IoTDB: Time Series Database for IoT"}],
+        ["meta", {name: "Keywords", content: "TSDB, time series, time series database, IoTDB, IoT database, IoT data management,时序数据库, 时间序列管理, IoTDB, 物联网数据库, 实时数据库, 物联网数据管理, 物联网数据"}],
+        ["meta", {name: "baidu-site-verification", content: "wfKETzB3OT"}],
+        ["meta", {name: "google-site-verification", content: "mZWAoRY0yj_HAr-s47zHCGHzx5Ju-RVm5wDbPnwQYFo"}],
+      ],
+```
+
+Additional tags that need to be injected into the HTML `<head>` of the current page, each tag can be specified in the format of `[tagName, {attrName: attrValue}, innerHTML?]`
+
+base:The base path of the deployment site. If you want to deploy your site to a sub-path, you will need to set it.
+
+title:The title of the website, it will be used as the prefix of all page titles. At the same time, under the default theme, it will be displayed on the navigation bar (navbar)
+
+description:The description of the website, which will be rendered into the HTML of the current page with the `<meta>` tag.
+
+See specific configuration information https://www.vuepress.cn/config/
+
+## locales
+
+```js
+	locales: {
+		'/': {
+		  lang: 'en-US', 
+		  title: ' ',
+		  description: ' '
+		},
+		'/zh/': {
+		  lang: 'zh-CN',
+		  title: ' ',
+		  description: ' '
+		}
+	  },
+```
+
+Represents / jumps English links, / zh / jumps Chinese links.
+
+The storage structure of the file is as follows.
+
+```
+docs
+├─ Userguide
+├─ SystemDesign
+├─ Download
+│  └─ README.md
+├─ etc.
+└─ zh
+   ├─ Userguide
+   ├─ SystemDesign
+   └─ Download
+      └─ README.md
+   ├─ etc.
+```
+
+## nav
+
+nav indicates the top navigation bar. Modify nav and pay attention to the Chinese or English version you modify.
+
+Where title represents the title of one of the nav, and items is the drop-down list
+
+![1585829024864](https://user-images.githubusercontent.com/37333508/78358190-57d8ad80-75e5-11ea-87cb-48da2eb5383a.png)
+
+```js
+			nav: [
+				 {
+					text: 'Document',
+					items: [
+						{ text: 'In progress', link: '/UserGuide/master/0-Get Started/1-QuickStart' },
+						{ text: 'V0.9.x', link: '/UserGuide/V0.9.x/0-Get Started/1-QuickStart' },
+					    { text: 'V0.8.x', link: '/UserGuide/V0.8.x/0-Get Started/1-QuickStart'},
+					]
+				  },
+```
+
+## sidebar
+
+The first one is a jump link, and children is the jump link that supplements this document
+
+**The total link is the domain name of the site + the specified language version (/ or / zh /) + the link of the sidebar + the link of the children**
+
+For other sidebar property configuration, see vuepress tutorialhttps://vuepress.vuejs.org/theme/default-theme-config.html#sidebar
+
+If you find it difficult to find in progress, directly ctrl + F search **/UserGuide/master/** Jump to that piece, Chinese is **/zh/UserGuide/master/**
+
+![1585915743956](https://user-images.githubusercontent.com/37333508/78359162-121ce480-75e7-11ea-87ab-7ab61d5cda39.png)
+
+```js
+			sidebar: {
+				'/UserGuide/V0.8.x/': [
+					{
+						title:'User Guide(V0.8.x)',
+						collapsable: false,
+					},
+					{
+						title: '0-Get Started',
+						children: [
+							'0-Get Started/1-QuickStart',
+							'0-Get Started/2-Frequently asked questions',
+							'0-Get Started/3-Publication'
+						]
+					},
+```
+
+
+
diff --git a/site/src/main/.vuepress/config.js b/site/src/main/.vuepress/config.js
index 869536f..719fcfe 100644
--- a/site/src/main/.vuepress/config.js
+++ b/site/src/main/.vuepress/config.js
@@ -105,19 +105,19 @@ var config = {
 				  {
 					text: 'ASF',
 					items: [
-					  { text: 'Foundation', link: 'http://www.apache.org/foundation/'},
-					  { text: 'License', link: 'http://www.apache.org/licenses/'},
-					  { text: 'Security', link: 'http://www.apache.org/security/'},
-					  { text: 'Sponsorship', link: 'http://www.apache.org/foundation/thanks.html'},
-					  { text: 'Thanks', link: 'http://www.apache.org/foundation/thanks.html'},
-					  { text: 'Current Events', link: 'http://www.apache.org/events/current-event'},
+					  { text: 'Foundation', link: 'http://www.apache.org/foundation/',rel:''},
+					  { text: 'License', link: 'http://www.apache.org/licenses/',rel:''},
+					  { text: 'Security', link: 'http://www.apache.org/security/',rel:''},
+					  { text: 'Sponsorship', link: 'http://www.apache.org/foundation/sponsorship.html',rel:''},
+					  { text: 'Thanks', link: 'http://www.apache.org/foundation/thanks.html',rel:''},
+					  { text: 'Current Events', link: 'http://www.apache.org/events/current-event',rel:''},
 					]
 				  },
 				  {
 					text: 'wiki',
 					items: [
-						{ text: 'github documents', link: 'https://github.com/apache/incubator-iotdb/tree/master/docs/Documentation'},
-						{ text: 'confluence', link: 'https://cwiki.apache.org/confluence/display/iotdb'},
+						{ text: 'github documents', link: 'https://github.com/apache/incubator-iotdb/tree/master/docs/Documentation',rel:''},
+						{ text: 'confluence', link: 'https://cwiki.apache.org/confluence/display/iotdb',rel:''},
 					  ]
 				  },
 			],
@@ -520,19 +520,19 @@ var config = {
 				  {
 					text: 'ASF',
 					items: [
-					  { text: '基础', link: 'http://www.apache.org/foundation/'},
-					  { text: '执照', link: 'http://www.apache.org/licenses/'},
-					  { text: '安全', link: 'http://www.apache.org/security/'},
-					  { text: '赞助', link: 'http://www.apache.org/foundation/thanks.html'},
-					  { text: '致谢', link: 'http://www.apache.org/foundation/thanks.html'},
-					  { text: '现在发生的事', link: 'http://www.apache.org/events/current-event'},
+					  { text: '基础', link: 'http://www.apache.org/foundation/',rel:''},
+					  { text: '执照', link: 'http://www.apache.org/licenses/',rel:''},
+					  { text: '安全', link: 'http://www.apache.org/security/',rel:''},
+					  { text: '赞助', link: 'http://www.apache.org/foundation/sponsorship.html',rel:''},
+					  { text: '致谢', link: 'http://www.apache.org/foundation/thanks.html',rel:''},
+					  { text: '现在发生的事', link: 'http://www.apache.org/events/current-event',rel:''},
 					]
 				  },
 				  {
 					text: 'wiki',
 					items: [
-						{ text: 'github文档', link: 'https://github.com/apache/incubator-iotdb/tree/master/docs/Documentation'},
-						{ text: 'confluence', link: 'https://cwiki.apache.org/confluence/display/iotdb'},
+						{ text: 'github文档', link: 'https://github.com/apache/incubator-iotdb/tree/master/docs/Documentation',rel:''},
+						{ text: 'confluence', link: 'https://cwiki.apache.org/confluence/display/iotdb',rel:''},
 					  ]
 				  },
 			],