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

imbajin pushed a commit to branch feat/oink-community-content
in repository https://gitbox.apache.org/repos/asf/hugegraph-doc.git

commit 66343fe43fc38d9dad81bb92db62a9cdce788ef5
Author: dark <[email protected]>
AuthorDate: Fri Sep 4 19:06:01 2026 +0800

    feat(docs): pilot OINK content components
    
    - render Server deployment choices as native steps\n- add titled wrapped 
and collapsed command examples\n- label long bilingual configuration blocks\n- 
anchor and widen the REST Vertex reference table
---
 content/cn/docs/clients/restful-api/vertex.md            |  9 +++++----
 content/cn/docs/config/config-guide.md                   |  2 +-
 content/cn/docs/quickstart/hugegraph/hugegraph-server.md | 15 ++++++++-------
 content/en/docs/clients/restful-api/vertex.md            |  9 +++++----
 content/en/docs/config/config-guide.md                   |  2 +-
 content/en/docs/quickstart/hugegraph/hugegraph-server.md | 15 ++++++++-------
 scripts/test_community_roster.py                         | 10 ++++++++++
 7 files changed, 38 insertions(+), 24 deletions(-)

diff --git a/content/cn/docs/clients/restful-api/vertex.md 
b/content/cn/docs/clients/restful-api/vertex.md
index 7f1c8a254..a64634126 100644
--- a/content/cn/docs/clients/restful-api/vertex.md
+++ b/content/cn/docs/clients/restful-api/vertex.md
@@ -5,7 +5,7 @@ weight: 7
 description: "Vertex(顶点)REST 接口:创建、查询、更新和删除图中的顶点数据,支持批量操作和条件过滤。"
 ---
 
-### 2.1 Vertex
+### 2.1 Vertex {#vertex-api}
 
 顶点类型中的 `Id` 策略决定了顶点的 `Id` 类型,其对应的 `id` 类型如下:
 
@@ -16,6 +16,7 @@ description: "Vertex(顶点)REST 接口:创建、查询、更新和删除图
 | CUSTOMIZE_STRING | string  |
 | CUSTOMIZE_NUMBER | number  |
 | CUSTOMIZE_UUID   | uuid    |
+{#vertex-id-strategy .full-width caption="顶点 ID 策略"}
 
 顶点的 `GET/PUT/DELETE` API 中 url 的 id 部分应该传入带有类型信息的 id 值,这个类型信息通过 json 
串是否带引号来表示,也就是说:
 
@@ -41,7 +42,7 @@ schema.vertexLabel("software").properties("name", "lang", 
"price").primaryKeys("
 
schema.indexLabel("personByAge").onV("person").by("age").range().ifNotExist().create();
 ```
 
-#### 2.1.1 创建一个顶点
+#### 2.1.1 创建一个顶点 {#create-vertex}
 
 ##### Params
 
@@ -58,7 +59,7 @@ POST 
http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph/graph/vertices
 
 ##### Request Body
 
-```json
+```json {filename="request.json" wrap=true}
 {
     "label": "person",
     "properties": {
@@ -76,7 +77,7 @@ POST 
http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph/graph/vertices
 
 ##### Response Body
 
-```json
+```json {filename="response.json" wrap=true}
 {
     "id": "1:marko",
     "label": "person",
diff --git a/content/cn/docs/config/config-guide.md 
b/content/cn/docs/config/config-guide.md
index ab391be16..ca3c70869 100644
--- a/content/cn/docs/config/config-guide.md
+++ b/content/cn/docs/config/config-guide.md
@@ -23,7 +23,7 @@ HugeGraphServer 内部集成了 GremlinServer 和 RestServer,而 
gremlin-serve
 
 `gremlin-server.yaml` 的主要结构如下。示例省略了部分导入项;完整内容以发布包中的文件为准。
 
-```yaml
+```yaml {filename="conf/gremlin-server.yaml" wrap=true collapse=18}
 # host and port of gremlin server, need to be consistent with host and port in 
rest-server.properties
 #host: 127.0.0.1
 #port: 8182
diff --git a/content/cn/docs/quickstart/hugegraph/hugegraph-server.md 
b/content/cn/docs/quickstart/hugegraph/hugegraph-server.md
index 588b90346..5141b7b64 100644
--- a/content/cn/docs/quickstart/hugegraph/hugegraph-server.md
+++ b/content/cn/docs/quickstart/hugegraph/hugegraph-server.md
@@ -32,10 +32,11 @@ HugeGraph 1.7.0 中的 `hugegraph-server` 模块使用 Java 11 编译,运行
 
 有四种方式可以部署 Server 服务:
 
-- 方式 1:使用 Docker 容器 (便于**测试**)
-- 方式 2:下载 tar 包
-- 方式 3:源码编译
-- 方式 4:使用 tools 工具部署 (Outdated)
+1. 使用 Docker 容器进行测试或开发。
+1. 下载二进制 tar 包。
+1. 从源码编译。
+1. 使用已过时的一键部署工具。
+{.steps}
 
 > 不要把 Gremlin、Cypher 
 > 等查询接口直接暴露到公网。生产环境应启用[认证与授权](/cn/docs/config/config-authentication/),限制网络访问并保留审计日志;部署建议见[安全指南](/cn/docs/guides/security/)。
 
@@ -66,7 +67,7 @@ HugeGraph 1.7.0 中的 `hugegraph-server` 模块使用 Java 11 编译,运行
 - **单节点快速启动**(预构建镜像):`docker/docker-compose.yml`
 - **单节点开发构建**(从源码构建):`docker/docker-compose.dev.yml`
 
-```bash
+```bash {filename="docker/docker-compose.yml" wrap=true}
 cd hugegraph/docker
 # 注意版本号请随时保持更新 → 1.x.0
 HUGEGRAPH_VERSION=1.7.0 docker compose up -d
@@ -84,7 +85,7 @@ HUGEGRAPH_VERSION=1.7.0 docker compose up -d
 
 ### 3.2 下载 tar 包
 
-```bash
+```bash {filename="download-release.sh" wrap=true collapse=2}
 # 1.7.0 是项目孵化期发布的历史版本,因此文件名仍带 incubating
 wget 
https://downloads.apache.org/hugegraph/1.7.0/apache-hugegraph-incubating-1.7.0.tar.gz
 tar zxf apache-hugegraph-incubating-1.7.0.tar.gz
@@ -96,7 +97,7 @@ tar zxf apache-hugegraph-incubating-1.7.0.tar.gz
 
 下载 HugeGraph 源代码
 
-```bash
+```bash {filename="build-from-source.sh" wrap=true collapse=2}
 git clone https://github.com/apache/hugegraph.git
 ```
 
diff --git a/content/en/docs/clients/restful-api/vertex.md 
b/content/en/docs/clients/restful-api/vertex.md
index ab401f5da..83b68e8a2 100644
--- a/content/en/docs/clients/restful-api/vertex.md
+++ b/content/en/docs/clients/restful-api/vertex.md
@@ -5,7 +5,7 @@ weight: 7
 description: "Vertex REST API: Create, query, update, and delete vertex data 
in the graph with support for batch operations and conditional filtering."
 ---
 
-### 2.1 Vertex
+### 2.1 Vertex {#vertex-api}
 
 In vertex types, the `Id` strategy determines the type of the vertex `Id`, 
with the corresponding relationships as follows:
 
@@ -16,6 +16,7 @@ In vertex types, the `Id` strategy determines the type of the 
vertex `Id`, with
 | CUSTOMIZE_STRING | string  |
 | CUSTOMIZE_NUMBER | number  |
 | CUSTOMIZE_UUID   | uuid    |
+{#vertex-id-strategy .full-width caption="Vertex ID strategies"}
 
 For the `GET/PUT/DELETE` API of a vertex, the id part in the URL should be 
passed as the id value with type information. This type information is 
indicated by whether the JSON string is enclosed in quotes, meaning:
 
@@ -41,7 +42,7 @@ schema.vertexLabel("software").properties("name", "lang", 
"price").primaryKeys("
 
schema.indexLabel("personByAge").onV("person").by("age").range().ifNotExist().create();
 ```
 
-#### 2.1.1 Create a vertex
+#### 2.1.1 Create a vertex {#create-vertex}
 
 ##### Method & Url
 
@@ -51,7 +52,7 @@ POST 
http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph/graph/vertices
 
 ##### Request Body
 
-```json
+```json {filename="request.json" wrap=true}
 {
     "label": "person",
     "properties": {
@@ -69,7 +70,7 @@ POST 
http://localhost:8080/graphspaces/DEFAULT/graphs/hugegraph/graph/vertices
 
 ##### Response Body
 
-```json
+```json {filename="response.json" wrap=true}
 {
     "id": "1:marko",
     "label": "person",
diff --git a/content/en/docs/config/config-guide.md 
b/content/en/docs/config/config-guide.md
index 53bd6e587..e82692f2f 100644
--- a/content/en/docs/config/config-guide.md
+++ b/content/en/docs/config/config-guide.md
@@ -23,7 +23,7 @@ Now let's introduce these three configuration files one by 
one.
 
 The main structure of `gremlin-server.yaml` is shown below. Some imports are 
omitted from this example; refer to the file included in the release package 
for the complete content.
 
-```yaml
+```yaml {filename="conf/gremlin-server.yaml" wrap=true collapse=18}
 # host and port of gremlin server, need to be consistent with host and port in 
rest-server.properties
 #host: 127.0.0.1
 #port: 8182
diff --git a/content/en/docs/quickstart/hugegraph/hugegraph-server.md 
b/content/en/docs/quickstart/hugegraph/hugegraph-server.md
index 93bcb0608..e225caf45 100644
--- a/content/en/docs/quickstart/hugegraph/hugegraph-server.md
+++ b/content/en/docs/quickstart/hugegraph/hugegraph-server.md
@@ -32,10 +32,11 @@ The `hugegraph-server` module in HugeGraph 1.7.0 is 
compiled with Java 11. Runni
 
 There are four ways to deploy the Server service:
 
-- Method 1: Use Docker container (Convenient for Test/Dev)
-- Method 2: Download the binary tarball
-- Method 3: Source code compilation
-- Method 4: One-click deployment
+1. Use a Docker container for test or development.
+1. Download the binary tarball.
+1. Compile the source code.
+1. Use the legacy one-click deployment tool.
+{.steps}
 
 > Do not expose Gremlin, Cypher, or other query endpoints directly to the 
 > public Internet. In production, enable [authentication and 
 > authorization](/docs/config/config-authentication/), restrict network 
 > access, and retain audit logs. See the [Security 
 > Guide](/docs/guides/security/) for deployment guidance.
 
@@ -64,7 +65,7 @@ Two compose files are available in the 
[`docker/`](https://github.com/apache/hug
 - **Single-node quickstart** (pre-built images): `docker/docker-compose.yml`
 - **Single-node dev build** (build from source): 
`docker/docker-compose.dev.yml`
 
-```bash
+```bash {filename="docker/docker-compose.yml" wrap=true}
 cd hugegraph/docker
 # Keep the version aligned with the latest release, for example 1.x.0
 HUGEGRAPH_VERSION=1.7.0 docker compose up -d
@@ -83,7 +84,7 @@ See 
[docker/README.md](https://github.com/apache/hugegraph/blob/master/docker/RE
 ### 3.2 Download the binary tarball
 
 You could download the binary tarball from the download page of the ASF site 
like this:
-```bash
+```bash {filename="download-and-verify.sh" wrap=true collapse=5}
 # 1.7.0 is a historical release from the incubation period, so its file name 
still includes "incubating"
 wget 
https://downloads.apache.org/hugegraph/1.7.0/apache-hugegraph-incubating-1.7.0.tar.gz
 tar zxf apache-hugegraph-incubating-1.7.0.tar.gz
@@ -101,7 +102,7 @@ Download HugeGraph **source code** in either of the 
following 2 ways (so as the
 - download the stable/release version from the ASF site
 - clone the unstable/latest version by GitBox(ASF) or GitHub
 
-```bash
+```bash {filename="build-from-source.sh" wrap=true collapse=5}
 # Way 1. download release package from the ASF site
 wget 
https://downloads.apache.org/hugegraph/{version}/apache-hugegraph-incubating-src-{version}.tar.gz
 tar zxf *hugegraph*.tar.gz
diff --git a/scripts/test_community_roster.py b/scripts/test_community_roster.py
index 7f2b4bdcf..e7bdbca56 100644
--- a/scripts/test_community_roster.py
+++ b/scripts/test_community_roster.py
@@ -76,6 +76,16 @@ class CommunityContentContractTests(unittest.TestCase):
             text = (ROOT / "content" / language / 
"docs/_index.md").read_text(encoding="utf-8")
             self.assertIn("LLMSFULL", text.split("---", 2)[1])
 
+    def test_component_pilots_are_bilingual_and_scoped(self):
+        for language in ("en", "cn"):
+            server = (ROOT / "content" / language / 
"docs/quickstart/hugegraph/hugegraph-server.md").read_text()
+            config = (ROOT / "content" / language / 
"docs/config/config-guide.md").read_text()
+            vertex = (ROOT / "content" / language / 
"docs/clients/restful-api/vertex.md").read_text()
+            self.assertIn("{.steps}", server)
+            self.assertIn('filename="conf/gremlin-server.yaml"', config)
+            self.assertIn(".full-width", vertex)
+            self.assertIn("{#vertex-id-strategy", vertex)
+
 
 if __name__ == "__main__":
     unittest.main()

Reply via email to