From f06e18d45a3970e6a53d79d796958cc39e79d428 Mon Sep 17 00:00:00 2001 From: 943155336 Date: Mon, 8 Nov 2021 11:24:18 +0800 Subject: [PATCH 01/12] Add latest news --- docs/.vuepress/config.js | 12 +- docs/.vuepress/public/images/home/new.svg | 1 + docs/.vuepress/theme/components/Home.vue | 33 +++++ docs/.vuepress/theme/layouts/Article.vue | 63 +++++++++ docs/.vuepress/theme/layouts/ArticleList.vue | 138 +++++++++++++++++++ docs/en/README.md | 2 + docs/en/article/article-list.md | 7 + docs/zh-CN/README.md | 2 + docs/zh-CN/article/article-list.md | 7 + 9 files changed, 264 insertions(+), 1 deletion(-) create mode 100644 docs/.vuepress/public/images/home/new.svg create mode 100644 docs/.vuepress/theme/layouts/Article.vue create mode 100644 docs/.vuepress/theme/layouts/ArticleList.vue create mode 100644 docs/en/article/article-list.md create mode 100644 docs/zh-CN/article/article-list.md diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 9ceb9d20fdca13..4b1f36e278bdd0 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -94,7 +94,12 @@ module.exports = { text: 'Download', link: '/en/downloads/downloads' } ], - sidebar: convertSidebar(require('./sidebar/en.js'), '/en/') + sidebar: convertSidebar(require('./sidebar/en.js'), '/en/'), + article: { + metaTime: 'Date', + paginationPre: 'Prev', + paginationNext: 'Next' + } }, '/zh-CN/': { algolia: buildAlgoliaSearchConfig('zh-CN'), @@ -108,6 +113,11 @@ module.exports = { ], sidebar: { '/zh-CN/': convertSidebar(require('./sidebar/zh-CN.js'), '/zh-CN/') + }, + article: { + metaTime: '时间', + paginationPre: '上一页', + paginationNext: '下一页' } } } diff --git a/docs/.vuepress/public/images/home/new.svg b/docs/.vuepress/public/images/home/new.svg new file mode 100644 index 00000000000000..5cceb102e05781 --- /dev/null +++ b/docs/.vuepress/public/images/home/new.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/.vuepress/theme/components/Home.vue b/docs/.vuepress/theme/components/Home.vue index c9799f223ade80..e2a90a84d65285 100644 --- a/docs/.vuepress/theme/components/Home.vue +++ b/docs/.vuepress/theme/components/Home.vue @@ -54,6 +54,10 @@ under the License. class="action-button" :item="actionLink" /> +

+
+ + + + \ No newline at end of file diff --git a/docs/.vuepress/theme/layouts/ArticleList.vue b/docs/.vuepress/theme/layouts/ArticleList.vue new file mode 100644 index 00000000000000..cf2e581de88c81 --- /dev/null +++ b/docs/.vuepress/theme/layouts/ArticleList.vue @@ -0,0 +1,138 @@ + + + + + \ No newline at end of file diff --git a/docs/en/README.md b/docs/en/README.md index 19138c6a27d036..40040ee8704c97 100644 --- a/docs/en/README.md +++ b/docs/en/README.md @@ -90,4 +90,6 @@ cases: alt: 有道 actionText: Quick Start → actionLink: /en/installing/compilation +articleText: Latest News +articleLink: /en/article/article-list --- diff --git a/docs/en/article/article-list.md b/docs/en/article/article-list.md new file mode 100644 index 00000000000000..de2c0235be3f80 --- /dev/null +++ b/docs/en/article/article-list.md @@ -0,0 +1,7 @@ +--- +{ + "title": "articleList", + "language": "en", + "layout": "ArticleList" +} +--- \ No newline at end of file diff --git a/docs/zh-CN/README.md b/docs/zh-CN/README.md index 95611e43f3aad0..cf45c79ee8b690 100644 --- a/docs/zh-CN/README.md +++ b/docs/zh-CN/README.md @@ -90,4 +90,6 @@ cases: alt: 有道 actionText: 快速上手 → actionLink: /zh-CN/installing/compilation +articleText: 最新动态 +articleLink: /zh-CN/article/article-list --- diff --git a/docs/zh-CN/article/article-list.md b/docs/zh-CN/article/article-list.md new file mode 100644 index 00000000000000..be57282dc4e0d0 --- /dev/null +++ b/docs/zh-CN/article/article-list.md @@ -0,0 +1,7 @@ +--- +{ + "title": "文章列表", + "language": "zh-CN", + "layout": "ArticleList" +} +--- \ No newline at end of file From 1954bf99f6c50fd4d1f987aaa69f03677ea705fe Mon Sep 17 00:00:00 2001 From: 943155336 Date: Mon, 8 Nov 2021 15:20:14 +0800 Subject: [PATCH 02/12] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=87=E7=AB=A0?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/.vuepress/theme/layouts/ArticleList.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/.vuepress/theme/layouts/ArticleList.vue b/docs/.vuepress/theme/layouts/ArticleList.vue index cf2e581de88c81..28a45ad212dd6c 100644 --- a/docs/.vuepress/theme/layouts/ArticleList.vue +++ b/docs/.vuepress/theme/layouts/ArticleList.vue @@ -24,7 +24,7 @@ under the License.
- {{item.title}} + {{item.frontmatter.title}}

{{item.frontmatter.description}}

From a19b8cb1e02d68a2ce0db87f376b70b9eba987c8 Mon Sep 17 00:00:00 2001 From: 943155336 Date: Mon, 8 Nov 2021 17:06:48 +0800 Subject: [PATCH 03/12] add write blog --- docs/.vuepress/sidebar/en.js | 1 + docs/.vuepress/sidebar/zh-CN.js | 1 + docs/en/developer-guide/How-to-Share-blogs.md | 90 ++++++++++++++++++ .../developer-guide/How-to-Share-blogs.md | 91 +++++++++++++++++++ 4 files changed, 183 insertions(+) create mode 100644 docs/en/developer-guide/How-to-Share-blogs.md create mode 100644 docs/zh-CN/developer-guide/How-to-Share-blogs.md diff --git a/docs/.vuepress/sidebar/en.js b/docs/.vuepress/sidebar/en.js index 682fd9fb8fe208..d11494a667bff8 100644 --- a/docs/.vuepress/sidebar/en.js +++ b/docs/.vuepress/sidebar/en.js @@ -580,6 +580,7 @@ module.exports = [ "be-vscode-dev", "java-format-code", "cpp-format-code", + "How-to-Share-blogs" ], }, { diff --git a/docs/.vuepress/sidebar/zh-CN.js b/docs/.vuepress/sidebar/zh-CN.js index 0ada9ad16e38b3..96c306536efb04 100644 --- a/docs/.vuepress/sidebar/zh-CN.js +++ b/docs/.vuepress/sidebar/zh-CN.js @@ -585,6 +585,7 @@ module.exports = [ "be-vscode-dev", "java-format-code", "cpp-format-code", + "How-to-Share-blogs" ], }, { diff --git a/docs/en/developer-guide/How-to-Share-blogs.md b/docs/en/developer-guide/How-to-Share-blogs.md new file mode 100644 index 00000000000000..14165cba781abe --- /dev/null +++ b/docs/en/developer-guide/How-to-Share-blogs.md @@ -0,0 +1,90 @@ +--- +{ + "title": "How to Share blogs", + "language": "zh-CN" +} +--- + + + +# How to share a blog + + +## Write a blog file + +To write a blog file, you must first include Front Matter information in the header,It mainly contains the following contents: + +| Variable | default | description | +|--------|----------------------------|----------| +| title| - | Blog title| +| description | - | Blog description| +| date | - | Blog date | +| metaTitle | article | Mark blog file | +| language | en/zn-CN | language | +| layout | Article | Layout of the components | +| sidebar | false | Hide the sidebar | + +The title, description and date fields are filled in by the blog writer, while the other fields are fixed values。 + +File header example: +``` +--- +{ + "title": "This is title", + "description": "This is description", + "date": "2021-11-03", + "metaTitle": "article", + "language": "zh-CN", + "layout": "Article", + "sidebar": false +} +--- +``` +At the same time add Apache License content after the file header: + +``` + +``` +Finally, write the content of the blog body。 + +## Blog file storage directory + +After the blog file is written, put it in the corresponding directory. The Chinese language directory is:zh-CN/article/articles/,The directory corresponding to the English language is:en/article/articles/。 + +## View blog + +Write a blog and put it in the corresponding directory, you can go to view the blog。Click the latest news button on the homepage to enter the blog list page, and click the blog title again to view the blog details。 \ No newline at end of file diff --git a/docs/zh-CN/developer-guide/How-to-Share-blogs.md b/docs/zh-CN/developer-guide/How-to-Share-blogs.md new file mode 100644 index 00000000000000..e482184b520c7c --- /dev/null +++ b/docs/zh-CN/developer-guide/How-to-Share-blogs.md @@ -0,0 +1,91 @@ +--- +{ + "title": "如何分享Blog", + "language": "zh-CN" +} +--- + + + +# 如何分享Blog + + +## 编写Blog文件 + +编写一个Blog文件,首先要在头部包含Front Matter信息,主要包含以下内容: + +| 变量名 | 默认值 | 含义 | +|--------|----------------------------|----------| +| title| - | Blog标题| +| description | - | Blog描述| +| date | - | Blog发布时间 | +| metaTitle | article | 标记Blog文件 | +| language | en/zn-CN | 语言 | +| layout | Article | 布局组件 | +| sidebar | false | 隐藏侧边栏 | + +其中title、description和date字段值由Blog编写者填写,其他字段为固定值。 + +文件头示例: +``` +--- +{ + "title": "This is title", + "description": "This is description", + "date": "2021-11-03", + "metaTitle": "article", + "language": "zh-CN", + "layout": "Article", + "sidebar": false +} +--- +``` +同时在文件头后面添加Apache License内容: + +``` + +``` +最后编写Blog正文内容。 + +## Blog文件的存放目录 + +Blog文件编写完成之后,将其放到相应的目录中。中文语言的目录是:zh-CN/article/articles/, +英文语言对应的目录是:en/article/articles/。 + +## 查看Blog + +编写好Blog并将其放入相应目录,就可以去查看Blog了。点击首页的最新动态按钮进入Blog列表页,再次点击Blog标题即可查看Blog详情。 \ No newline at end of file From 1204d343d6f6b0e29524b7ed2d8374da62025ad2 Mon Sep 17 00:00:00 2001 From: 943155336 Date: Tue, 9 Nov 2021 13:48:05 +0800 Subject: [PATCH 04/12] Fix last news icon loading failure --- docs/.vuepress/theme/components/Home.vue | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/docs/.vuepress/theme/components/Home.vue b/docs/.vuepress/theme/components/Home.vue index e2a90a84d65285..2c0ba6a17ba7ea 100644 --- a/docs/.vuepress/theme/components/Home.vue +++ b/docs/.vuepress/theme/components/Home.vue @@ -54,10 +54,13 @@ under the License. class="action-button" :item="actionLink" /> - + + + last news +

Date: Tue, 9 Nov 2021 18:08:38 +0800 Subject: [PATCH 05/12] Fix version nav button loaded multiple times --- docs/.vuepress/theme/layouts/Layout.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/.vuepress/theme/layouts/Layout.vue b/docs/.vuepress/theme/layouts/Layout.vue index 57936255fd52bf..98ad31348553ef 100644 --- a/docs/.vuepress/theme/layouts/Layout.vue +++ b/docs/.vuepress/theme/layouts/Layout.vue @@ -42,9 +42,9 @@ export default { .get("/versions.json") .then(res => { Object.keys(this.$site.themeConfig.locales).forEach(k => { - this.$site.themeConfig.locales[k].nav = this.$site.themeConfig.locales[k].nav.concat( - res.data[k.replace(/\//gi, "")] || [] - ) + const nav = res.data[k.replace(/\//gi, "")] || [] + const localNav = nav.filter(item => this.$site.themeConfig.locales[k].nav.every(v => v.text !== item.text)) + this.$site.themeConfig.locales[k].nav = this.$site.themeConfig.locales[k].nav.concat(localNav) }) this.renderIndex = 1 }) From 549ab89975ff4b7a78109e515ea5507c3dce5cd9 Mon Sep 17 00:00:00 2001 From: 943155336 Date: Wed, 10 Nov 2021 18:15:48 +0800 Subject: [PATCH 06/12] Add author field to blog --- docs/.vuepress/config.js | 2 ++ docs/.vuepress/theme/layouts/Article.vue | 12 ++++++++++-- docs/.vuepress/theme/layouts/ArticleList.vue | 6 ++++-- docs/en/developer-guide/How-to-Share-blogs.md | 2 ++ docs/zh-CN/developer-guide/How-to-Share-blogs.md | 2 ++ 5 files changed, 20 insertions(+), 4 deletions(-) diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 4b1f36e278bdd0..1631a0134d4b33 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -97,6 +97,7 @@ module.exports = { sidebar: convertSidebar(require('./sidebar/en.js'), '/en/'), article: { metaTime: 'Date', + metaAuthor: 'Author', paginationPre: 'Prev', paginationNext: 'Next' } @@ -116,6 +117,7 @@ module.exports = { }, article: { metaTime: '时间', + metaAuthor: '作者', paginationPre: '上一页', paginationNext: '下一页' } diff --git a/docs/.vuepress/theme/layouts/Article.vue b/docs/.vuepress/theme/layouts/Article.vue index 9e9e4c29396446..117aa139cbc4c1 100644 --- a/docs/.vuepress/theme/layouts/Article.vue +++ b/docs/.vuepress/theme/layouts/Article.vue @@ -24,7 +24,12 @@ under the License.

{{frontmatter.title}}

- + +
@@ -57,7 +62,10 @@ export default { max-width: 740px margin: 0 auto .article-sub-header - .article-date + .article-header-item font-size: 13px color: #888888 + margin-right 16px + .article-header-item-content + color: #555555 \ No newline at end of file diff --git a/docs/.vuepress/theme/layouts/ArticleList.vue b/docs/.vuepress/theme/layouts/ArticleList.vue index 28a45ad212dd6c..972d15066b0fda 100644 --- a/docs/.vuepress/theme/layouts/ArticleList.vue +++ b/docs/.vuepress/theme/layouts/ArticleList.vue @@ -31,6 +31,9 @@ under the License.
{{$themeLocaleConfig.article.metaTime}}:{{item.frontmatter.date}}
+
+ {{$themeLocaleConfig.article.metaAuthor}}:{{item.frontmatter.author}} +
@@ -111,11 +114,10 @@ export default { align-items: center font-size: 12px line-height: 12px + color: #888888 .article-item-meta:not(:last-child) margin-bottom: 3px margin-right: 20px - .article-item-time - color: #888888 .article-item:last-child border: none .article-pagination-wrap diff --git a/docs/en/developer-guide/How-to-Share-blogs.md b/docs/en/developer-guide/How-to-Share-blogs.md index 14165cba781abe..064940fcefee20 100644 --- a/docs/en/developer-guide/How-to-Share-blogs.md +++ b/docs/en/developer-guide/How-to-Share-blogs.md @@ -36,6 +36,7 @@ To write a blog file, you must first include Front Matter information in the hea | title| - | Blog title| | description | - | Blog description| | date | - | Blog date | +| author | - | Blog author | | metaTitle | article | Mark blog file | | language | en/zn-CN | language | | layout | Article | Layout of the components | @@ -50,6 +51,7 @@ File header example: "title": "This is title", "description": "This is description", "date": "2021-11-03", + "author": "Alex", "metaTitle": "article", "language": "zh-CN", "layout": "Article", diff --git a/docs/zh-CN/developer-guide/How-to-Share-blogs.md b/docs/zh-CN/developer-guide/How-to-Share-blogs.md index e482184b520c7c..f0d257c632a4fc 100644 --- a/docs/zh-CN/developer-guide/How-to-Share-blogs.md +++ b/docs/zh-CN/developer-guide/How-to-Share-blogs.md @@ -36,6 +36,7 @@ under the License. | title| - | Blog标题| | description | - | Blog描述| | date | - | Blog发布时间 | +| author | - | Blog作者 | | metaTitle | article | 标记Blog文件 | | language | en/zn-CN | 语言 | | layout | Article | 布局组件 | @@ -50,6 +51,7 @@ under the License. "title": "This is title", "description": "This is description", "date": "2021-11-03", + "author": "Alex", "metaTitle": "article", "language": "zh-CN", "layout": "Article", From c3b0661705146b69a2e603532c1fbcf466d92f28 Mon Sep 17 00:00:00 2001 From: wangyongfeng <943155336@qq.com> Date: Wed, 15 Dec 2021 15:03:53 +0800 Subject: [PATCH 07/12] =?UTF-8?q?=E5=BC=80=E5=8F=91=E6=A1=88=E4=BE=8B?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/.vuepress/components/CaseList.vue | 84 ++++++++++++++++++++++++ docs/.vuepress/theme/components/Home.vue | 4 +- 2 files changed, 86 insertions(+), 2 deletions(-) create mode 100644 docs/.vuepress/components/CaseList.vue diff --git a/docs/.vuepress/components/CaseList.vue b/docs/.vuepress/components/CaseList.vue new file mode 100644 index 00000000000000..a9151cbd780014 --- /dev/null +++ b/docs/.vuepress/components/CaseList.vue @@ -0,0 +1,84 @@ + + + + + \ No newline at end of file diff --git a/docs/.vuepress/theme/components/Home.vue b/docs/.vuepress/theme/components/Home.vue index 2c0ba6a17ba7ea..54945dc81caa73 100644 --- a/docs/.vuepress/theme/components/Home.vue +++ b/docs/.vuepress/theme/components/Home.vue @@ -138,7 +138,7 @@ under the License.
-
@@ -161,7 +161,7 @@ under the License. >
-
+
-->