Copilot commented on code in PR #2043:
URL: https://github.com/apache/apisix-website/pull/2043#discussion_r3232477824
##########
config/navbar.js:
##########
@@ -2,7 +2,7 @@ module.exports = [
{
label: 'Docs',
position: 'right',
- to: '/docs',
+ href: 'https://apisix.apache.org/docs/',
target: '_parent',
Review Comment:
The PR description’s root cause is broken links to routes that *don’t exist*
in the `doc` workspace (e.g. `/blog`, `/downloads`, etc.). `/docs` is expected
to exist in the doc workspace, so converting the primary Docs entry to an
absolute production URL is likely unnecessary and can regress local/dev/staging
behavior (always sends users to production) and forces a full page load instead
of SPA navigation. Recommendation: keep `/docs` as an internal `to: '/docs'`
link (and only convert truly cross-workspace routes to absolute URLs).
##########
config/navbar.js:
##########
@@ -47,43 +47,43 @@ module.exports = [
},
{
label: 'General',
- to: '/docs/general/join',
+ href: 'https://apisix.apache.org/docs/general/join/',
target: '_parent',
},
Review Comment:
This converts an in-docs page (`/docs/general/join/`) to an absolute
production URL. If this page exists within the doc workspace, it shouldn’t be
part of the broken-link problem and changing it to an external link harms local
preview, environment parity (staging), and in-app navigation performance.
Suggest reverting doc-owned routes under `/docs/...` back to internal `to:
'/docs/...'` (keeping absolute URLs only for routes owned by `website`/`blog`
workspaces).
##########
config/navbar.js:
##########
@@ -47,43 +47,43 @@ module.exports = [
},
{
label: 'General',
- to: '/docs/general/join',
+ href: 'https://apisix.apache.org/docs/general/join/',
target: '_parent',
},
],
},
{
- to: '/learning-center',
+ href: 'https://apisix.apache.org/learning-center/',
label: 'Learning Center',
position: 'right',
target: '_parent',
},
{
- to: '/blog',
+ href: 'https://apisix.apache.org/blog/',
label: 'Blog',
position: 'right',
target: '_parent',
},
Review Comment:
The same absolute origin (`https://apisix.apache.org`) is repeated across
multiple entries (and in other files touched by this PR). This increases the
chance of inconsistent updates later (e.g., domain change, previews).
Recommendation: extract a single base-URL constant in this module (e.g., `const
APISIX_SITE = 'https://apisix.apache.org'`) and build `href` values from it, or
use an environment/config-driven value where feasible so preview/staging
deployments don’t hardcode production.
--
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]