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

jeffreyh 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 c958533e0e0 [fix]:support redirect to doc homepage (#1747)
c958533e0e0 is described below

commit c958533e0e0b610c701bfa599f6dd8ded4d32dde
Author: yangon <2689991...@qq.com>
AuthorDate: Thu Jan 9 19:12:55 2025 +0800

    [fix]:support redirect to doc homepage (#1747)
---
 docusaurus.config.js | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/docusaurus.config.js b/docusaurus.config.js
index 001906b688b..a772633ba96 100644
--- a/docusaurus.config.js
+++ b/docusaurus.config.js
@@ -93,7 +93,6 @@ const config = {
         // 'https://fonts.gstatic.com',
         // 
'https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Noto+Sans:ital,wght@0,100..900;1,100..900&display=swap'
     ],
-    organizationName: 'apache/doris-website', // Usually your GitHub org/user 
name.
     projectName: 'apache/doris-website', // Usually your repo name.
     customFields: {},
     future: {
@@ -142,6 +141,15 @@ const config = {
                         to: '/docs/gettingStarted/quick-start',
                     },
                 ],
+                createRedirects(existingPath) {
+                    if 
(existingPath.includes('/gettingStarted/what-is-apache-doris')) {
+                        // Redirect from /gettingStarted/what-is-new to 
/gettingStarted/what-is-apache-doris
+                        return [
+                            
existingPath.replace('/gettingStarted/what-is-apache-doris', 
'/gettingStarted/what-is-new'),
+                        ];
+                    }
+                    return undefined; // Return a falsy value: no redirect 
created
+                },
             },
         ],
     ],
@@ -184,7 +192,7 @@ const config = {
                     changefreq: 'weekly',
                     priority: 0.5,
                     filename: 'sitemap.xml',
-                    createSitemapItems: async (params) => {
+                    createSitemapItems: async params => {
                         const { defaultCreateSitemapItems, ...rest } = params;
                         const items = await defaultCreateSitemapItems(rest);
                         for (let item of items) {


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

Reply via email to