Copilot commented on code in PR #2002:
URL: https://github.com/apache/apisix-website/pull/2002#discussion_r2922177820


##########
website/static/robots.txt:
##########
@@ -1,7 +1,13 @@
 # Algolia-Crawler-Verif: 027907D9E46C48C1
 
 User-agent: *
+Disallow: /blog/tags/
+Disallow: /zh/blog/tags/
+Disallow: /blog/page/
+Disallow: /zh/blog/page/
+Disallow: /search
+Disallow: /zh/search

Review Comment:
   `/search` and `/zh/search` are disallowed here, but `config/schema-org.js` 
advertises a `SearchAction` pointing at `/search?q=...`. If you want Google to 
use sitelinks search, the target URL needs to be crawlable (not blocked by 
robots). Either remove these Disallow rules or remove/adjust the SearchAction 
target so they’re consistent.
   ```suggestion
   
   ```



##########
website/src/pages/plugins.tsx:
##########
@@ -236,6 +236,8 @@ const Plugins: FC = () => {
   return (
     <Layout title={translate({ message: 'Plugin Hub' })}>
       <Head>
+        <meta name="description" content="Explore 80+ Apache APISIX plugins 
for authentication, security, traffic control, observability, and AI. Powerful 
integrations for your API Gateway." />
+        <meta property="og:description" content="Explore 80+ Apache APISIX 
plugins for authentication, security, traffic control, observability, and AI." 
/>

Review Comment:
   These meta description strings are hardcoded in English. Since the site 
supports multiple locales, the zh build will also get the English meta tags. 
Consider using `translate(...)` with IDs so the description and og:description 
can be localized per locale.
   ```suggestion
           <meta
             name="description"
             content={translate({
               id: 'plugins.meta.description',
               message:
                 'Explore 80+ Apache APISIX plugins for authentication, 
security, traffic control, observability, and AI. Powerful integrations for 
your API Gateway.',
             })}
           />
           <meta
             property="og:description"
             content={translate({
               id: 'plugins.meta.ogDescription',
               message:
                 'Explore 80+ Apache APISIX plugins for authentication, 
security, traffic control, observability, and AI.',
             })}
           />
   ```



##########
website/src/pages/docs.tsx:
##########
@@ -177,6 +178,10 @@ const Docs: FC = () => {
 
   return (
     <Layout title={translate({ message: 'Documentation' })}>
+      <Head>
+        <meta name="description" content="Browse Apache APISIX documentation 
for API Gateway, AI Gateway, Ingress Controller, Helm Chart, and plugin 
development. Get started with guides, tutorials, and API references." />
+        <meta property="og:description" content="Browse Apache APISIX 
documentation for API Gateway, AI Gateway, Ingress Controller, Helm Chart, and 
plugin development." />

Review Comment:
   These meta description strings are hardcoded in English. Since this site is 
configured for i18n (and the page already uses `Translate`/`translate`), the zh 
locale will also ship English `<meta name="description">`/`og:description`. 
Consider wrapping these values in `translate(...)` with stable IDs so 
locale-specific builds get localized metadata.
   ```suggestion
           <meta
             name="description"
             content={translate({
               id: 'docs.meta.description',
               message:
                 'Browse Apache APISIX documentation for API Gateway, AI 
Gateway, Ingress Controller, Helm Chart, and plugin development. Get started 
with guides, tutorials, and API references.',
               description: 'Meta description for the main Apache APISIX 
documentation page.',
             })}
           />
           <meta
             property="og:description"
             content={translate({
               id: 'docs.meta.ogDescription',
               message:
                 'Browse Apache APISIX documentation for API Gateway, AI 
Gateway, Ingress Controller, Helm Chart, and plugin development.',
               description: 'Open Graph description for the main Apache APISIX 
documentation page.',
             })}
           />
   ```



##########
config/schema-org.js:
##########
@@ -9,12 +9,46 @@ module.exports = function () {
             attributes: {
               type: 'application/ld+json',
             },
-            innerHTML: JSON.stringify({
-              '@context': 'https://schema.org',
-              '@type': 'WebSite',
-              name: 'Apache APISIX',
-              url: 'https://apisix.apache.org',
-            }),
+            innerHTML: JSON.stringify([
+              {
+                '@context': 'https://schema.org',
+                '@type': 'WebSite',
+                name: 'Apache APISIX',
+                url: 'https://apisix.apache.org',
+                potentialAction: {
+                  '@type': 'SearchAction',
+                  target: 
'https://apisix.apache.org/search?q={search_term_string}',
+                  'query-input': 'required name=search_term_string',
+                },

Review Comment:
   The `SearchAction.target` points to `/search?q=...`, but this repo doesn’t 
configure an Algolia `searchPagePath` or define a `/search` page, and 
`robots.txt` now disallows `/search`. This makes the structured-data sitelinks 
search action effectively invalid/blocked for crawlers. Consider either (1) 
adding a real, crawlable search results page and allowing it in `robots.txt`, 
or (2) removing the `SearchAction` block until a search URL exists.
   ```suggestion
   
   ```



##########
website/src/pages/help.tsx:
##########
@@ -28,6 +29,10 @@ const Page = styled.div`
 
 const Help: FC = () => (
   <Layout title={translate({ message: 'Help' })}>
+    <Head>
+      <meta name="description" content="Get help with Apache APISIX. Browse 
documentation, join the community on GitHub, Slack, and Twitter, and connect 
with contributors." />
+      <meta property="og:description" content="Get help with Apache APISIX. 
Browse documentation and join the community on GitHub, Slack, and Twitter." />

Review Comment:
   These meta description strings are hardcoded in English. With Docusaurus 
i18n enabled, the zh locale will also ship these English meta tags. Consider 
using `translate(...)` with IDs so each locale can provide localized 
`description` and `og:description`.
   ```suggestion
         <meta
           name="description"
           content={translate({
             id: 'help.meta.description',
             message:
               'Get help with Apache APISIX. Browse documentation, join the 
community on GitHub, Slack, and Twitter, and connect with contributors.',
           })}
         />
         <meta
           property="og:description"
           content={translate({
             id: 'help.meta.ogDescription',
             message:
               'Get help with Apache APISIX. Browse documentation and join the 
community on GitHub, Slack, and Twitter.',
           })}
         />
   ```



##########
website/src/pages/downloads.tsx:
##########
@@ -57,6 +58,10 @@ const DownloadCards: FC = () => {
 
 const Downloads: FC = () => (
   <Layout title={translate({ message: 'Downloads' })}>
+    <Head>
+      <meta name="description" content="Download Apache APISIX, the 
cloud-native API Gateway and AI Gateway. Get the latest release, verify 
signatures, and access historical versions." />
+      <meta property="og:description" content="Download Apache APISIX, the 
cloud-native API Gateway and AI Gateway. Get the latest release and historical 
versions." />

Review Comment:
   These meta description strings are hardcoded in English. Because the site is 
i18n-enabled, the zh locale will also include English `<meta 
name="description">`/`og:description`. Consider using `translate(...)` with IDs 
(similar to visible text) so metadata is localized per locale.
   ```suggestion
         <meta
           name="description"
           content={translate({
             id: 'download.website.meta.description',
             message:
               'Download Apache APISIX, the cloud-native API Gateway and AI 
Gateway. Get the latest release, verify signatures, and access historical 
versions.',
           })}
         />
         <meta
           property="og:description"
           content={translate({
             id: 'download.website.meta.ogDescription',
             message:
               'Download Apache APISIX, the cloud-native API Gateway and AI 
Gateway. Get the latest release and historical versions.',
           })}
         />
   ```



##########
website/src/pages/team.tsx:
##########
@@ -287,6 +288,10 @@ const Team: FC = () => {
   ));
   return (
     <Layout title={translate({ message: 'Team' })}>
+      <Head>
+        <meta name="description" content="Meet the Apache APISIX team — PMC 
members, committers, and contributors building the cloud-native API Gateway and 
AI Gateway." />
+        <meta property="og:description" content="Meet the Apache APISIX team — 
PMC members, committers, and contributors." />

Review Comment:
   These meta description strings are hardcoded in English. With Docusaurus 
i18n enabled, the zh locale will also ship English `<meta 
name="description">`/`og:description`. Consider using `translate(...)` with IDs 
to make these locale-specific.
   ```suggestion
           <meta
             name="description"
             content={translate({
               id: 'team.meta.description',
               message:
                 'Meet the Apache APISIX team — PMC members, committers, and 
contributors building the cloud-native API Gateway and AI Gateway.',
             })}
           />
           <meta
             property="og:description"
             content={translate({
               id: 'team.meta.ogDescription',
               message:
                 'Meet the Apache APISIX team — PMC members, committers, and 
contributors.',
             })}
           />
   ```



##########
website/src/pages/showcase.tsx:
##########
@@ -80,6 +81,10 @@ const Content: FC = () => {
 
 const Showcase: FC = () => (
   <Layout title={translate({ message: 'ShowCase' })}>
+    <Head>
+      <meta name="description" content="See which companies and organizations 
use Apache APISIX in production. Join the growing community of API Gateway 
users worldwide." />
+      <meta property="og:description" content="See which companies and 
organizations use Apache APISIX in production." />

Review Comment:
   These meta description strings are hardcoded in English. Because the site is 
i18n-enabled, the zh locale will also include these English meta tags. Consider 
switching to `translate(...)` with IDs so the metadata can be localized 
alongside the visible strings.



-- 
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]

Reply via email to