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

juzhiyuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-website.git


The following commit(s) were added to refs/heads/master by this push:
     new 24626cf  feat: added java plugin runner download block (#411)
24626cf is described below

commit 24626cf3a91f94a2045d9264c7cddf448bbef0e7
Author: Ayush das <[email protected]>
AuthorDate: Fri Jul 16 11:43:55 2021 +0530

    feat: added java plugin runner download block (#411)
    
    Co-authored-by: 琚致远 <[email protected]>
---
 website/docusaurus.config.js               | 21 ++++++++++++++++++++-
 website/src/pages/downloads/ProjectCard.js | 21 ++++++++++-----------
 2 files changed, 30 insertions(+), 12 deletions(-)

diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js
index 326ffa8..ea56629 100644
--- a/website/docusaurus.config.js
+++ b/website/docusaurus.config.js
@@ -102,6 +102,8 @@ module.exports = {
         shape: "triangle",
         color: "#e8433e",
         githubRepo: "apache/apisix",
+        githubBranch: "master",
+        downloadPath: "apisix/2.7/apache-apisix-2.7-src",
         version: "2.7",
         releaseDate: "2021-06-25",
         firstDocPath: "/getting-started",
@@ -114,6 +116,8 @@ module.exports = {
         shape: "square",
         color: "#10B981",
         githubRepo: "apache/apisix-dashboard",
+        githubBranch: "master",
+        downloadPath: "apisix/dashboard/2.7/apache-apisix-dashboard-2.7-src",
         version: "2.7",
         releaseDate: "2021-06-15",
         firstDocPath: "/USER_GUIDE",
@@ -125,10 +129,25 @@ module.exports = {
         shape: "hexagon",
         color: "#2563EB",
         githubRepo: "apache/apisix-ingress-controller",
+        githubBranch: "master",
+        downloadPath: 
"apisix/ingress-controller/1.1.0/apache-apisix-ingress-controller-1.1.0-src",
         version: "1.1.0",
         releaseDate: "2021-07-13",
         firstDocPath: "/getting-started",
-      }
+      },
+      {
+        name: "APISIX™ Java Plugin Runner",
+        nameInParamCase: "java-plugin-runner",
+        description: "Runs Apache APISIX plugins written in Java. Implemented 
as a sidecar that accompanies Apache APISIX.",
+        shape: "star",
+        color: "#FB9300",
+        githubRepo: "apache/apisix-java-plugin-runner",
+        githubBranch: "main",
+        downloadPath: 
"apisix/java-plugin-runner/0.1/apisix-java-plugin-runner-0.1.0-src",
+        version: "0.1.0",
+        releaseDate: "2021-06-23",
+        firstDocPath: "/development",
+      },
     ],
 
     team: require("./static/data/team.json"),
diff --git a/website/src/pages/downloads/ProjectCard.js 
b/website/src/pages/downloads/ProjectCard.js
index b989192..7409a18 100644
--- a/website/src/pages/downloads/ProjectCard.js
+++ b/website/src/pages/downloads/ProjectCard.js
@@ -9,6 +9,7 @@ import IconDownload from "../../assets/icons/download.svg";
 import IconTriangle from "../../assets/icons/triangle.svg";
 import IconSquare from "../../assets/icons/square.svg";
 import IconHexagon from "../../assets/icons/hexagon.svg";
+import IconStarSolid from "../../assets/icons/star-solid.svg";
 
 const Dropdown = (props) => {
   const ref = useRef();
@@ -34,27 +35,25 @@ const ProjectCard = (props) => {
   const [repoStats, setRepoStats] = useState({ stars: 0, issues: 0 });
   const {
     name,
-    nameInParamCase,
     description,
     shape,
     color,
     version,
     releaseDate,
     githubRepo,
+    githubBranch,
+    downloadPath
   } = props;
   const shapeComponent =
     shape === "triangle" ? (
       <IconTriangle />
     ) : shape === "square" ? (
       <IconSquare />
-    ) : (
+    ) : shape === "hexagon" ? (
       <IconHexagon />
+    ) : (
+      <IconStarSolid />
     );
-  const downloadLink = `apisix${
-    nameInParamCase !== "apisix" ? "/" + nameInParamCase : ""
-  }/${version}/apache-${
-    nameInParamCase !== "apisix" ? "apisix-" + nameInParamCase : "apisix"
-  }-${version}-src`;
 
   useEffect(() => {
     getGitHubRepoStats(githubRepo).then((stats) => {
@@ -92,7 +91,7 @@ const ProjectCard = (props) => {
           </LeftSideLink>
           <LeftSideLink
             className="downloads-leftsidelink"
-            href={`https://github.com/${githubRepo}/blob/master/CHANGELOG.md`}
+            
href={`https://github.com/${githubRepo}/blob/${githubBranch}/CHANGELOG.md`}
             target="_blank"
           >
             <IconDocumentText /> CHANGELOG
@@ -120,21 +119,21 @@ const ProjectCard = (props) => {
           >
             <DropdownItem
               className="download-dropdown-item"
-              
href={`https://www.apache.org/dyn/closer.cgi/${downloadLink}.tgz`}
+              
href={`https://www.apache.org/dyn/closer.cgi/${downloadPath}.tgz`}
               target="_blank"
             >
               Source
             </DropdownItem>
             <DropdownItem
               className="download-dropdown-item"
-              href={`https://downloads.apache.org/${downloadLink}.tgz.asc`}
+              href={`https://downloads.apache.org/${downloadPath}.tgz.asc`}
               target="_blank"
             >
               ASC
             </DropdownItem>
             <DropdownItem
               className="download-dropdown-item"
-              href={`https://downloads.apache.org/${downloadLink}.tgz.sha512`}
+              href={`https://downloads.apache.org/${downloadPath}.tgz.sha512`}
               target="_blank"
             >
               SHA512

Reply via email to