shuashuai commented on PR #276: URL: https://github.com/apache/incubator-answer-website/pull/276#issuecomment-2519456345
> Done. It can be accessed at https://change-url.apache-answer.pages.dev/. Functionality is fine, the `docusaurus.config.js` configuration file could be optimized by extracting the url for redirect into a separate file so that it doesn't affect the reading of `docusaurus.config.js`. eg: create `redirect.js` file ``` module.exports = [ { to: '/community/support', from: ['/contact', '/community'], }, ... ] ``` require and use in docusaurus.config.js file eg: ``` const redirectPaths = require('./redirect.js'); [ '@docusaurus/plugin-client-redirects', { redirects: redirectPaths, }, ], ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
