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

jiafengzheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git


The following commit(s) were added to refs/heads/master by this push:
     new e23fbd83df6 add edit entry for documentation dev version (#80)
e23fbd83df6 is described below

commit e23fbd83df6b55dc85ee09f4c1f05fd0b2e23946
Author: song7788q <songp...@gmail.com>
AuthorDate: Mon Sep 5 19:33:36 2022 +0800

    add edit entry for documentation dev version (#80)
    
    add edit entry for documentation dev version
---
 config/custom-docusaurus-plugin.js                 |   4 +-
 config/ssrTemplate.js                              |   6 +-
 docusaurus.config.js                               |   9 ++-
 i18n/zh-CN/code.json                               |  15 +++++
 .../current.json                                   |   2 +-
 .../docusaurus-plugin-content-docs/current.json    |   6 +-
 .../version-0.15.json                              |   2 +-
 src/theme/DocItemFooter/index.d.ts                 |   4 ++
 src/theme/DocItemFooter/index.js                   |  64 +++++++++++++++++++++
 src/theme/DocItemFooter/styles.module.css          |  11 ++++
 src/theme/SearchBar/fetchIndexes.js                |   2 +-
 static/images/icon/u21.png                         | Bin 5981 -> 18084 bytes
 12 files changed, 115 insertions(+), 10 deletions(-)

diff --git a/config/custom-docusaurus-plugin.js 
b/config/custom-docusaurus-plugin.js
index 5ae9f47440e..1dca9c2fe0a 100644
--- a/config/custom-docusaurus-plugin.js
+++ b/config/custom-docusaurus-plugin.js
@@ -9,8 +9,8 @@ module.exports = function (context, options) {
                     ...config.output,
                     publicPath:
                         context.i18n.currentLocale === 'en'
-                            ? 'https://cdn.selectdb.com/'
-                            : 'https://cdn.selectdb.com/zh-CN/',
+                            ? 'https://cdn-tencent.selectdb.com/'
+                            : 'https://cdn-tencent.selectdb.com/zh-CN/',
                 },
             };
         },
diff --git a/config/ssrTemplate.js b/config/ssrTemplate.js
index e2c84109b46..68ab734b064 100644
--- a/config/ssrTemplate.js
+++ b/config/ssrTemplate.js
@@ -13,10 +13,10 @@ module.exports = {
       <%~ metaAttribute %>
     <% }); %>
     <% it.stylesheets.forEach((stylesheet) => { %>
-      <link rel="stylesheet" href="<%= 'https://cdn.selectdb.com' %><%= 
it.baseUrl %><%= stylesheet %>" />
+      <link rel="stylesheet" href="<%= 'https://cdn-tencent.selectdb.com' 
%><%= it.baseUrl %><%= stylesheet %>" />
     <% }); %>
     <% it.scripts.forEach((script) => { %>
-      <link rel="preload" href="<%= 'https://cdn.selectdb.com' %><%= 
it.baseUrl %><%= script %>" as="script">
+      <link rel="preload" href="<%= 'https://cdn-tencent.selectdb.com' %><%= 
it.baseUrl %><%= script %>" as="script">
     <% }); %>
   </head>
   <body <%~ it.bodyAttributes %>>
@@ -25,7 +25,7 @@ module.exports = {
       <%~ it.appHtml %>
     </div>
     <% it.scripts.forEach((script) => { %>
-      <script src="<%= 'https://cdn.selectdb.com' %><%= it.baseUrl %><%= 
script %>"></script>
+      <script src="<%= 'https://cdn-tencent.selectdb.com' %><%= it.baseUrl 
%><%= script %>"></script>
     <% }); %>
     <%~ it.postBodyTags %>
   </body>
diff --git a/docusaurus.config.js b/docusaurus.config.js
index f8c58a6d5c2..0f4d378dee9 100644
--- a/docusaurus.config.js
+++ b/docusaurus.config.js
@@ -132,6 +132,13 @@ const config = {
                         process.env.NODE_ENV === 'development' && 
!showAllVersions
                             ? ['current']
                             : ['current', ...versions],
+                    editUrl: ({ locale, versionDocsDirPath, docPath }) => {
+                        if (versionDocsDirPath === 
'versioned_docs/version-dev') {
+                            return 
`https://github.com/apache/doris/edit/master/docs/${locale}/docs/${docPath}`;
+                        }
+                    },
+                    showLastUpdateAuthor: false,
+                    showLastUpdateTime: false,
                 },
                 blog: {
                     blogTitle: 'Blog',
@@ -171,7 +178,7 @@ const config = {
                 title: '',
                 logo: {
                     alt: 'Doris',
-                    src: 'https://cdn.selectdb.com/images/logo.svg',
+                    src: 'https://cdn-tencent.selectdb.com/images/logo.svg',
                 },
                 items: [
                     { to: '/', label: 'Home', position: 'left', exact: true },
diff --git a/i18n/zh-CN/code.json b/i18n/zh-CN/code.json
index b436c7fb819..80b45461bb0 100644
--- a/i18n/zh-CN/code.json
+++ b/i18n/zh-CN/code.json
@@ -521,5 +521,20 @@
   },
   "users.title": {
     "message": "用户"
+  },
+  "documentation.feedback": {
+    "message": "问题反馈"
+  },
+  "theme.PwaReloadPopup.info": {
+    "message": "有可用的新版本",
+    "description": "The text for PWA reload popup"
+  },
+  "theme.PwaReloadPopup.refreshButtonText": {
+    "message": "刷新",
+    "description": "The text for PWA reload button"
+  },
+  "theme.PwaReloadPopup.closeButtonAriaLabel": {
+    "message": "关闭",
+    "description": "The ARIA label for close button of PWA reload popup"
   }
 }
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs-community/current.json 
b/i18n/zh-CN/docusaurus-plugin-content-docs-community/current.json
index 2de71656e1a..1bf8b12be6e 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs-community/current.json
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs-community/current.json
@@ -21,6 +21,6 @@
   },
   "sidebar.community.link.Improvement Proposals": {
     "message": "改进建议",
-    "description": "The label for Doris Improvement Proposals in sidebar 
community"
+    "description": "The label for link Improvement Proposals in sidebar 
community, linking to 
https://cwiki.apache.org/confluence/display/DORIS/Doris+Improvement+Proposals";
   }
 }
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current.json 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current.json
index 8f21f963eee..b1d9cde0022 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current.json
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current.json
@@ -9,7 +9,7 @@
   },
   "sidebar.docs.category.Doris Introduction": {
     "message": "Doris 介绍",
-    "description": "The label for category Doris Architecture in sidebar docs"
+    "description": "The label for category Doris Introduction in sidebar docs"
   },
   "sidebar.docs.category.Install And Deploy": {
     "message": "安装部署",
@@ -270,5 +270,9 @@
   "sidebar.docs.category.Benchmark": {
     "message": "性能测试",
     "description": "The label for category Benchmark in sidebar docs"
+  },
+  "sidebar.docs.category.Release notes": {
+    "message": "Release notes",
+    "description": "The label for category Release notes in sidebar docs"
   }
 }
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.15.json 
b/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.15.json
index 901a312495d..25c557b520d 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.15.json
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.15.json
@@ -135,4 +135,4 @@
     "message": "辅助命令",
     "description": "The label for category Utility in sidebar docs"
   }
-}
\ No newline at end of file
+}
diff --git a/src/theme/DocItemFooter/index.d.ts 
b/src/theme/DocItemFooter/index.d.ts
new file mode 100644
index 00000000000..66898d4c4f8
--- /dev/null
+++ b/src/theme/DocItemFooter/index.d.ts
@@ -0,0 +1,4 @@
+/// <reference types="@docusaurus/plugin-content-docs" />
+/// <reference types="react" />
+import type { Props } from '@theme/DocItem';
+export default function DocItemFooter(props: Props): JSX.Element | null;
diff --git a/src/theme/DocItemFooter/index.js b/src/theme/DocItemFooter/index.js
new file mode 100644
index 00000000000..5f29e39fbd4
--- /dev/null
+++ b/src/theme/DocItemFooter/index.js
@@ -0,0 +1,64 @@
+import React from 'react';
+import clsx from 'clsx';
+import { ThemeClassNames } from '@docusaurus/theme-common';
+import LastUpdated from '@theme/LastUpdated';
+import EditThisPage from '@theme/EditThisPage';
+import TagsListInline from '@theme/TagsListInline';
+import styles from './styles.module.css';
+import Link from '@docusaurus/Link';
+import Translate from '@docusaurus/Translate';
+function TagsRow(props) {
+    return (
+        <div className={clsx(ThemeClassNames.docs.docFooterTagsRow, 'row 
margin-bottom--sm')}>
+            <div className="col">
+                <TagsListInline {...props} />
+            </div>
+        </div>
+    );
+}
+function EditMetaRow({ editUrl, lastUpdatedAt, lastUpdatedBy, 
formattedLastUpdatedAt }) {
+    return (
+        <div className={clsx(ThemeClassNames.docs.docFooterEditMetaRow, 
'row')}>
+            <div className="col">{editUrl && <EditThisPage editUrl={editUrl} 
/>}</div>
+            {/* <div className={clsx('col', styles.lastUpdated)}>
+        {(lastUpdatedAt || lastUpdatedBy) && (
+          <LastUpdated
+            lastUpdatedAt={lastUpdatedAt}
+            formattedLastUpdatedAt={formattedLastUpdatedAt}
+            lastUpdatedBy={lastUpdatedBy}
+          />
+        )}
+      </div> */}
+            <div className={clsx('col', styles.lastUpdated)}>
+                <Link to="https://github.com/apache/doris/discussions";>
+                    <Translate id="documentation.feedback">Feedback</Translate>
+                </Link>
+            </div>
+        </div>
+    );
+}
+export default function DocItemFooter(props) {
+    const { content: DocContent } = props;
+    const { metadata } = DocContent;
+    console.log(metadata);
+    const { editUrl, lastUpdatedAt, formattedLastUpdatedAt, lastUpdatedBy, 
tags } = metadata;
+    const canDisplayTagsRow = tags.length > 0;
+    const canDisplayEditMetaRow = !!(editUrl || lastUpdatedAt || 
lastUpdatedBy);
+    const canDisplayFooter = canDisplayTagsRow || canDisplayEditMetaRow;
+    if (!canDisplayFooter) {
+        return null;
+    }
+    return (
+        <footer className={clsx(ThemeClassNames.docs.docFooter, 
'docusaurus-mt-lg')}>
+            {canDisplayTagsRow && <TagsRow tags={tags} />}
+            {canDisplayEditMetaRow && (
+                <EditMetaRow
+                    editUrl={editUrl}
+                    lastUpdatedAt={lastUpdatedAt}
+                    lastUpdatedBy={lastUpdatedBy}
+                    formattedLastUpdatedAt={formattedLastUpdatedAt}
+                />
+            )}
+        </footer>
+    );
+}
diff --git a/src/theme/DocItemFooter/styles.module.css 
b/src/theme/DocItemFooter/styles.module.css
new file mode 100644
index 00000000000..746af366c6f
--- /dev/null
+++ b/src/theme/DocItemFooter/styles.module.css
@@ -0,0 +1,11 @@
+.lastUpdated {
+  /* margin-top: 0.2rem; */
+  /* font-style: italic; */
+  /* font-size: smaller; */
+}
+
+@media (min-width: 997px) {
+  .lastUpdated {
+    text-align: right;
+  }
+}
diff --git a/src/theme/SearchBar/fetchIndexes.js 
b/src/theme/SearchBar/fetchIndexes.js
index 369677190c3..0019caf7e2a 100644
--- a/src/theme/SearchBar/fetchIndexes.js
+++ b/src/theme/SearchBar/fetchIndexes.js
@@ -3,7 +3,7 @@ import { searchIndexUrl } from '../../utils/proxiedGenerated';
 export async function fetchIndexes(baseUrl) {
     if (process.env.NODE_ENV === 'production') {
         // const json = await (await 
fetch(`${baseUrl}${searchIndexUrl}`)).json();
-        const json = await (await 
fetch(`https://cdn.selectdb.com${baseUrl}${searchIndexUrl}`)).json();
+        const json = await (await 
fetch(`https://cdn-tencent.selectdb.com${baseUrl}${searchIndexUrl}`)).json();
         const wrappedIndexes = json.map(({ documents, index }, type) => ({
             type: type,
             documents,
diff --git a/static/images/icon/u21.png b/static/images/icon/u21.png
index 7fd60faaae0..5584e479f93 100644
Binary files a/static/images/icon/u21.png and b/static/images/icon/u21.png 
differ


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to