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 3c681bdd414ecf6af128d7a97a72bfa4f22ff560
Author: dark <[email protected]>
AuthorDate: Fri Sep 4 20:06:48 2026 +0800

    fix(community): isolate landing extensions
    
    - leave LLMSFULL ownership with the core platform lane\n- select the 
members partial through native landing data\n- scope Markdown rendering to the 
Community content type\n- preserve section order and unrelated About Markdown 
output
---
 content/cn/docs/_index.md              |  1 -
 content/en/docs/_index.md              |  1 -
 data/landing/community/cn.yaml         |  1 +
 data/landing/community/en.yaml         |  1 +
 layouts/_partials/landing/section.html | 45 --------------------------
 layouts/community/landing.md           | 23 ++++++++++++++
 layouts/landing.md                     | 18 -----------
 scripts/test_community_roster.py       | 58 ++++++++++++++++++++++------------
 8 files changed, 62 insertions(+), 86 deletions(-)

diff --git a/content/cn/docs/_index.md b/content/cn/docs/_index.md
index e75800bb3..2e3503418 100755
--- a/content/cn/docs/_index.md
+++ b/content/cn/docs/_index.md
@@ -2,7 +2,6 @@
 title: "Documentation"
 linkTitle: "Documentation"
 weight: 20
-outputs: [HTML, RSS, print, markdown, LLMSFULL]
 ---
 
 ## Apache HugeGraph 文档
diff --git a/content/en/docs/_index.md b/content/en/docs/_index.md
index 7b1c7b8ee..a9cd5fbca 100755
--- a/content/en/docs/_index.md
+++ b/content/en/docs/_index.md
@@ -2,7 +2,6 @@
 title: "Documentation"
 linkTitle: "Documentation"
 weight: 20
-outputs: [HTML, RSS, print, markdown, LLMSFULL]
 ---
 
 ## Apache HugeGraph Documentation
diff --git a/data/landing/community/cn.yaml b/data/landing/community/cn.yaml
index 39f89749f..ec95ae75a 100644
--- a/data/landing/community/cn.yaml
+++ b/data/landing/community/cn.yaml
@@ -35,6 +35,7 @@ sections:
             - [贡献指南](/cn/docs/contribution-guidelines/) — 了解如何贡献代码和文档。
 
   - type: community-members
+    partial: landing/sections/community-members.html
     data:
       id: project-members
 
diff --git a/data/landing/community/en.yaml b/data/landing/community/en.yaml
index f5ef8ba2e..d5b34325e 100644
--- a/data/landing/community/en.yaml
+++ b/data/landing/community/en.yaml
@@ -35,6 +35,7 @@ sections:
             - [Contribution guidelines](/docs/contribution-guidelines/) — 
learn how to contribute code and documentation.
 
   - type: community-members
+    partial: landing/sections/community-members.html
     data:
       id: project-members
 
diff --git a/layouts/_partials/landing/section.html 
b/layouts/_partials/landing/section.html
deleted file mode 100644
index 254c48ed4..000000000
--- a/layouts/_partials/landing/section.html
+++ /dev/null
@@ -1,45 +0,0 @@
-{{- $page := .page -}}
-{{- $home := .home -}}
-{{- $resolved := partial "landing/entry.html" (dict "home" $home "entry" 
.entry) -}}
-{{- $rawType := $resolved.rawType -}}
-{{- $type := $resolved.type -}}
-{{- $key := $resolved.key -}}
-{{- $entryMap := $resolved.entry -}}
-{{- $data := $resolved.data -}}
-{{- $enabled := $resolved.enabled -}}
-{{- $registry := dict
-  "hero" "landing/sections/hero.html"
-  "metrics" "landing/sections/metrics.html"
-  "capabilities" "landing/sections/capabilities.html"
-  "principles" "landing/sections/principles.html"
-  "cards" "landing/sections/cards.html"
-  "logo-wall" "landing/sections/logo-wall.html"
-  "gallery" "landing/sections/gallery.html"
-  "testimonials" "landing/sections/testimonials.html"
-  "contributors" "landing/sections/contributors.html"
-  "community-members" "landing/sections/community-members.html"
-  "faq" "landing/sections/faq.html"
-  "markdown" "landing/sections/markdown.html"
-  "cta" "landing/sections/cta.html"
-  "pricing" "landing/sections/pricing.html"
-  "pricing-compare" "landing/sections/pricing-compare.html"
-  "command-box" "landing/sections/command-box.html"
-  "steps" "landing/sections/steps.html"
-  "timeline" "landing/sections/timeline.html"
-  "code-plate" "landing/sections/code-plate.html"
-  "preview" "landing/sections/preview.html"
-  "case-study" "landing/sections/case-study.html"
-  "download" "landing/sections/download.html"
-  "bar-chart" "landing/sections/bar-chart.html"
--}}
-{{- $template := index $registry $type | default "" -}}
-{{- with index $entryMap "partial" }}{{ $template = printf "%v" . }}{{ end -}}
-{{- if and $enabled $data $template -}}
-  {{- $id := $key | default $type -}}
-  {{- with index $entryMap "id" }}{{ $id = printf "%v" . }}{{ end -}}
-  {{- with index $data "id" }}{{ $id = printf "%v" . }}{{ end -}}
-  {{- $id = $id | anchorize -}}
-  {{- partial $template (dict "page" $page "home" $home "data" $data "entry" 
$entryMap "type" $type "id" $id "index" $.index) -}}
-{{- else if and $enabled (not $template) -}}
-  {{- warnf "OINK landing page: unknown section type %q" $rawType -}}
-{{- end -}}
diff --git a/layouts/community/landing.md b/layouts/community/landing.md
new file mode 100644
index 000000000..cd96ba06a
--- /dev/null
+++ b/layouts/community/landing.md
@@ -0,0 +1,23 @@
+{{- /*
+  Community Markdown follows the landing data order. Native OINK sections use
+  its text renderer unchanged; only the nested roster uses the site partial.
+*/ -}}
+{{- .Store.Set "tdOutputFormat" "markdown" -}}
+{{- partial "page-meta-lastmod.html" . }}
+
+{{- $page := . -}}
+{{- $landing := partial "landing/data.html" . -}}
+{{- range $entry := ($landing.sections | default slice) -}}
+  {{- $resolved := partial "landing/entry.html" (dict "home" $landing "entry" 
$entry) -}}
+  {{- if and $resolved.enabled $resolved.data -}}
+    {{- if eq $resolved.type "community-members" -}}
+      {{- partial "community/members.md" (dict "page" $page) -}}
+    {{- else -}}
+      {{- $text := partial "landing/text.html" (dict "page" $page "data" (dict 
"sections" (slice $entry))) | strings.TrimSpace -}}
+      {{- with $text }}
+{{ . | safeHTML }}
+
+      {{- end -}}
+    {{- end -}}
+  {{- end -}}
+{{- end -}}
diff --git a/layouts/landing.md b/layouts/landing.md
deleted file mode 100644
index 9e37861d6..000000000
--- a/layouts/landing.md
+++ /dev/null
@@ -1,18 +0,0 @@
-{{- .Store.Set "tdOutputFormat" "markdown" -}}
-{{- partial "page-meta-lastmod.html" . }}
-{{- $landing := partial "landing/data.html" . -}}
-{{- $text := partial "landing/text.html" (dict "page" . "data" $landing) | 
strings.TrimSpace -}}
-{{- if and (eq .Section "community") (eq (.Params.landing | default "") 
"community") -}}
-  {{- $parts := split $text "\n\n" -}}
-  {{- $ctaHeading := cond (eq .Language.Lang "cn") "## 了解项目运作方式" "## Learn how 
the project works" -}}
-  {{- $roster := partial "community/members.md" (dict "page" .) | 
strings.TrimSpace -}}
-  {{- $before := slice -}}{{- $after := slice -}}{{- $found := false -}}
-  {{- range $parts -}}
-    {{- if and (not $found) (strings.HasPrefix . $ctaHeading) }}{{ $found = 
true }}{{ end -}}
-    {{- if $found }}{{ $after = $after | append . }}{{ else }}{{ $before = 
$before | append . }}{{ end -}}
-  {{- end -}}
-  {{- $text = delimit (slice (delimit $before "\n\n") $roster (delimit $after 
"\n\n")) "\n\n" -}}
-{{- end -}}
-{{- with $text }}
-{{ . | safeHTML }}
-{{- end }}
diff --git a/scripts/test_community_roster.py b/scripts/test_community_roster.py
index f6fc2062b..60f203fdd 100644
--- a/scripts/test_community_roster.py
+++ b/scripts/test_community_roster.py
@@ -217,10 +217,10 @@ class CommunityContentContractTests(unittest.TestCase):
                 self.assertIn("search_keywords:", text, 
f"{language}/{relative}")
                 self.assertIn("search_boost:", text, f"{language}/{relative}")
 
-    def test_docs_roots_enable_llmsfull_only_in_front_matter(self):
+    def test_docs_roots_leave_llmsfull_to_core_platform_lane(self):
         for language in ("en", "cn"):
             text = (ROOT / "content" / language / 
"docs/_index.md").read_text(encoding="utf-8")
-            self.assertIn("LLMSFULL", text.split("---", 2)[1])
+            self.assertNotIn("LLMSFULL", text.split("---", 2)[1])
 
     def test_component_pilots_are_bilingual_and_scoped(self):
         for language in ("en", "cn"):
@@ -255,6 +255,41 @@ class CommunityContentContractTests(unittest.TestCase):
             self.assertIn('id="vertex-id-strategy"', rendered["vertex_print"])
             self.assertIn("{#vertex-id-strategy .full-width", 
rendered["vertex_md"])
 
+    def 
test_community_markdown_follows_section_order_and_about_is_unchanged(self):
+        expected = {
+            "community/index.md": (
+                "## Join the Apache HugeGraph community",
+                "## Get involved",
+                "## Project members",
+                "## Learn how the project works",
+            ),
+            "cn/community/index.md": (
+                "## 加入 Apache HugeGraph 社区",
+                "## 参与社区",
+                "## 项目成员",
+                "## 了解项目运作方式",
+            ),
+        }
+        for relative, markers in expected.items():
+            rendered = (self.site / relative).read_text(encoding="utf-8")
+            positions = [rendered.index(marker) for marker in markers]
+            self.assertEqual(positions, sorted(positions))
+        about = {
+            "about/index.md": (
+                "## One ecosystem for graph data and graph intelligence",
+                "HugeGraph is an Apache top-level project",
+            ),
+            "cn/about/index.md": (
+                "## 连接图数据与图智能的一体化生态",
+                "HugeGraph 是 Apache 顶级项目",
+            ),
+        }
+        for relative, markers in about.items():
+            rendered = (self.site / relative).read_text(encoding="utf-8")
+            self.assertNotIn("Project members", rendered)
+            for marker in markers:
+                self.assertIn(marker, rendered)
+
     def test_fixed_metadata_is_present_in_actual_offline_indexes(self):
         relative_refs = [
             "docs/introduction/",
@@ -280,25 +315,6 @@ class CommunityContentContractTests(unittest.TestCase):
                 self.assertTrue(records[ref]["keywords"], ref)
                 self.assertGreater(records[ref]["boost"], 1, ref)
 
-    def test_llmsfull_outputs_exist_and_include_expected_documents(self):
-        outputs = {
-            self.site / "docs/llms-full.txt": (
-                "# HugeGraph Server Quick Start",
-                "# Server Startup Guide",
-                "# Vertex API",
-            ),
-            self.site / "cn/docs/llms-full.txt": (
-                "# HugeGraph Server 快速开始",
-                "# Server 启动指南",
-                "# Vertex API",
-            ),
-        }
-        for path, markers in outputs.items():
-            self.assertTrue(path.is_file())
-            rendered = path.read_text(encoding="utf-8")
-            for marker in markers:
-                self.assertIn(marker, rendered)
-
 
 if __name__ == "__main__":
     unittest.main()

Reply via email to