You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by xu...@apache.org on 2026/06/18 08:40:40 UTC

(opendal) branch main updated: docs(website): link landing service and binding entries to docs (#7795)

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

Xuanwo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/opendal.git


The following commit(s) were added to refs/heads/main by this push:
     new ec239c7d0 docs(website): link landing service and binding entries to docs (#7795)
ec239c7d0 is described below

commit ec239c7d0f2178fccc639c651d0c772be01f9d85
Author: Xuanwo <gi...@xuanwo.io>
AuthorDate: Thu Jun 18 16:40:34 2026 +0800

    docs(website): link landing service and binding entries to docs (#7795)
    
    The landing page showed services as static chips and bindings as static cards, with no way to reach the matching documentation. Make each entry a link: service chips go to /services/<scheme>, and binding cards go to their docs landing page (/docs/core for Rust, /docs/bindings/<slug> for the rest).
---
 website/src/components/landing/data.js           | 37 +++++++++++++-----------
 website/src/components/landing/sections.jsx      | 14 ++++++---
 website/src/components/landing/styles.module.css | 15 ++++++++++
 3 files changed, 45 insertions(+), 21 deletions(-)

diff --git a/website/src/components/landing/data.js b/website/src/components/landing/data.js
index a86912338..201b73073 100644
--- a/website/src/components/landing/data.js
+++ b/website/src/components/landing/data.js
@@ -330,24 +330,27 @@ export const serviceGroups = [
   },
 ];
 
+// Each binding links to its docs landing page. Rust is the core crate and lives
+// at /docs/core; every other binding lives under /docs/bindings/<dir>, where the
+// dir matches the doc slug (e.g. Node.js -> nodejs, C++ -> cpp, .NET -> dotnet).
 export const bindings = [
-  { name: "Rust", icon: "/img/bindings/rust.svg" },
-  { name: "Python", icon: "/img/bindings/python.svg" },
-  { name: "Java", icon: "/img/bindings/java.svg" },
-  { name: "Go", icon: "/img/bindings/go.svg" },
-  { name: "Node.js", icon: "/img/bindings/nodejs.svg" },
-  { name: "C", icon: "/img/bindings/c.svg" },
-  { name: "C++", icon: "/img/bindings/cpp.svg" },
-  { name: ".NET", icon: "/img/bindings/dotnet.svg" },
-  { name: "Ruby", icon: "/img/bindings/ruby.svg" },
-  { name: "PHP", icon: "/img/bindings/php.svg" },
-  { name: "Swift", icon: "/img/bindings/swift.svg" },
-  { name: "Haskell", icon: "/img/bindings/haskell.svg" },
-  { name: "OCaml", icon: "/img/bindings/ocaml.svg" },
-  { name: "Lua", icon: "/img/bindings/lua.svg" },
-  { name: "Dart", icon: "/img/bindings/dart.svg" },
-  { name: "D", icon: "/img/bindings/d.svg" },
-  { name: "Zig", icon: "/img/bindings/zig.svg" },
+  { name: "Rust", icon: "/img/bindings/rust.svg", doc: "/docs/core" },
+  { name: "Python", icon: "/img/bindings/python.svg", doc: "/docs/bindings/python" },
+  { name: "Java", icon: "/img/bindings/java.svg", doc: "/docs/bindings/java" },
+  { name: "Go", icon: "/img/bindings/go.svg", doc: "/docs/bindings/go" },
+  { name: "Node.js", icon: "/img/bindings/nodejs.svg", doc: "/docs/bindings/nodejs" },
+  { name: "C", icon: "/img/bindings/c.svg", doc: "/docs/bindings/c" },
+  { name: "C++", icon: "/img/bindings/cpp.svg", doc: "/docs/bindings/cpp" },
+  { name: ".NET", icon: "/img/bindings/dotnet.svg", doc: "/docs/bindings/dotnet" },
+  { name: "Ruby", icon: "/img/bindings/ruby.svg", doc: "/docs/bindings/ruby" },
+  { name: "PHP", icon: "/img/bindings/php.svg", doc: "/docs/bindings/php" },
+  { name: "Swift", icon: "/img/bindings/swift.svg", doc: "/docs/bindings/swift" },
+  { name: "Haskell", icon: "/img/bindings/haskell.svg", doc: "/docs/bindings/haskell" },
+  { name: "OCaml", icon: "/img/bindings/ocaml.svg", doc: "/docs/bindings/ocaml" },
+  { name: "Lua", icon: "/img/bindings/lua.svg", doc: "/docs/bindings/lua" },
+  { name: "Dart", icon: "/img/bindings/dart.svg", doc: "/docs/bindings/dart" },
+  { name: "D", icon: "/img/bindings/d.svg", doc: "/docs/bindings/d" },
+  { name: "Zig", icon: "/img/bindings/zig.svg", doc: "/docs/bindings/zig" },
 ];
 
 export const layers = [
diff --git a/website/src/components/landing/sections.jsx b/website/src/components/landing/sections.jsx
index f3f65506d..fabb4bf97 100644
--- a/website/src/components/landing/sections.jsx
+++ b/website/src/components/landing/sections.jsx
@@ -250,7 +250,13 @@ export function Services() {
               <h3 className={styles.serviceGroupTitle}>{group.category}</h3>
               <div className={styles.serviceChips}>
                 {group.services.map((s) => (
-                  <span className={styles.serviceChip} key={s.name}>
+                  // Service docs live at /services/<scheme>, registered by
+                  // plugins/services-docs-plugin.js; s.name is the scheme.
+                  <Link
+                    className={styles.serviceChip}
+                    to={`/services/${s.name}`}
+                    key={s.name}
+                  >
                     <img
                       src={withBaseUrl(s.icon)}
                       alt=""
@@ -259,7 +265,7 @@ export function Services() {
                       loading="lazy"
                     />
                     {s.name}
-                  </span>
+                  </Link>
                 ))}
               </div>
             </div>
@@ -293,7 +299,7 @@ export function Bindings() {
         </div>
         <div className={`${styles.bindingGrid} ${styles.reveal}`}>
           {bindings.map((b) => (
-            <div className={styles.bindingCard} key={b.name}>
+            <Link className={styles.bindingCard} to={b.doc} key={b.name}>
               <img
                 src={withBaseUrl(b.icon)}
                 alt=""
@@ -302,7 +308,7 @@ export function Bindings() {
                 loading="lazy"
               />
               <span className={styles.bindingName}>{b.name}</span>
-            </div>
+            </Link>
           ))}
         </div>
       </div>
diff --git a/website/src/components/landing/styles.module.css b/website/src/components/landing/styles.module.css
index 8b1559bbe..7fa0a43bc 100644
--- a/website/src/components/landing/styles.module.css
+++ b/website/src/components/landing/styles.module.css
@@ -539,6 +539,15 @@
   font-family: var(--odl-font-mono);
   font-size: var(--odl-text-xs);
   color: var(--odl-fg);
+  text-decoration: none;
+  transition: border-color var(--odl-dur) var(--odl-ease),
+    background-color var(--odl-dur) var(--odl-ease);
+}
+.serviceChip:hover {
+  border-color: var(--odl-accent);
+  background: var(--odl-surface-2);
+  color: var(--odl-fg);
+  text-decoration: none;
 }
 .serviceChip img {
   width: 15px;
@@ -572,10 +581,12 @@
   justify-content: center;
   gap: var(--odl-space-3);
   padding: var(--odl-space-5) var(--odl-space-3);
+  text-decoration: none;
   transition: background-color var(--odl-dur) var(--odl-ease);
 }
 .bindingCard:hover {
   background: var(--odl-surface-2);
+  text-decoration: none;
 }
 .bindingCard img {
   width: 30px;
@@ -586,6 +597,10 @@
   font-family: var(--odl-font-mono);
   font-size: var(--odl-text-xs);
   color: var(--odl-fg-muted);
+  transition: color var(--odl-dur) var(--odl-ease);
+}
+.bindingCard:hover .bindingName {
+  color: var(--odl-fg);
 }
 
 /* ===== Layers (tile grid left, live code preview right) ================= */