Copilot commented on code in PR #13259:
URL: https://github.com/apache/apisix/pull/13259#discussion_r3109472359


##########
docs/zh/latest/plugins/ip-restriction.md:
##########
@@ -32,23 +32,21 @@ description: ip-restriction 插件支持通过配置 IP 地址白名单或黑名
   <link rel="canonical" href="https://docs.api7.ai/hub/ip-restriction"; />
 </head>
 
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';

Review Comment:
   In MDX, `import` statements must appear before any rendered content. Since 
this file already has content above (the `<head>...</head>` block), placing 
imports here can cause MDX parsing/build failures. Move these imports to the 
very top of the file (immediately after frontmatter, before any 
HTML/markdown/JSX content).



##########
docs/en/latest/plugins/ip-restriction.md:
##########
@@ -32,24 +32,21 @@ description: The ip-restriction Plugin supports restricting 
access to upstream r
   <link rel="canonical" href="https://docs.api7.ai/hub/ip-restriction"; />
 </head>
 
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';

Review Comment:
   Same MDX issue as the ZH doc: imports should be at the top of the MDX file 
(right after frontmatter) and before any content, otherwise the MDX compiler 
may error. Please move these imports to the top.



##########
docs/en/latest/plugins/ip-restriction.md:
##########
@@ -69,6 +66,17 @@ admin_key=$(yq '.deployment.admin.admin_key[0].key' 
conf/config.yaml | sed 's/"/
 
 The following example demonstrates how you can whitelist a list of IP 
addresses that should have access to the upstream resource and customize the 
error message for access denial.
 
+<Tabs
+groupId="api"

Review Comment:
   Using the same `groupId` (`api`) for multiple `<Tabs>` blocks on the same 
page will intentionally sync the selected tab across those blocks (and possibly 
persist selection beyond the section). If you want the two example sections to 
be independent, remove `groupId` or use a distinct `groupId` per section.
   ```suggestion
   groupId="ip-restriction-whitelist-api"
   ```



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