[website][upgrade] feat: some external link pages and contact page (#13686)
diff --git a/site2/website-next/docusaurus.config.js b/site2/website-next/docusaurus.config.js
index 2c825e2..3f562b1 100644
--- a/site2/website-next/docusaurus.config.js
+++ b/site2/website-next/docusaurus.config.js
@@ -120,7 +120,6 @@
label: "Docs",
},
{ to: "/download", label: "Download", position: "left" },
- { to: "/blog", label: "Blog", position: "left" },
{
label: "REST APIs",
position: "left",
@@ -169,6 +168,83 @@
},
],
},
+ { to: "/blog", label: "Blog", position: "left" },
+ {
+ label: "Community",
+ position: "left",
+ items: [
+ {
+ label: "Contact",
+ to: "/:locale/contact",
+ },
+ // {
+ // label: "Contributing",
+ // to: "/:locale/contributing",
+ // },
+ // {
+ // label: "Coding guide",
+ // to: "/:locale/coding-guide",
+ // },
+ // {
+ // label: "Events",
+ // to: "/:locale/events",
+ // },
+ {
+ label: "Twitter",
+ href: "https://twitter.com/Apache_Pulsar",
+ },
+ {
+ label: "Wiki",
+ href: "https://github.com/apache/pulsar/wiki",
+ },
+ {
+ label: "Issue tracking",
+ href: "https://github.com/apache/pulsar/issues",
+ },
+ {
+ label: "Pulsar Summit",
+ href: "https://pulsar-summit.org/",
+ },
+ // {
+ // label: "Resources",
+ // to: "/:locale/resources",
+ // },
+ // {
+ // label: "Team",
+ // to: "/:locale/team",
+ // },
+ // {
+ // label: "Powered By",
+ // to: "/:locale/powered-by",
+ // },
+ ],
+ },
+ {
+ label: "Apache",
+ position: "left",
+ items: [
+ {
+ label: "Foundation",
+ href: "https://www.apache.org/",
+ },
+ {
+ label: "License",
+ href: "https://www.apache.org/licenses/",
+ },
+ {
+ label: "Sponsorship",
+ href: "https://www.apache.org/foundation/sponsorship.html",
+ },
+ {
+ label: "Thanks",
+ href: "https://www.apache.org/foundation/thanks.html",
+ },
+ {
+ label: "Security",
+ href: "https://www.apache.org/security",
+ },
+ ],
+ },
{
href: "https://github.com/apache/pulsar",
label: "GitHub",
diff --git a/site2/website-next/src/components/MailTable.js b/site2/website-next/src/components/MailTable.js
new file mode 100644
index 0000000..d686cb0
--- /dev/null
+++ b/site2/website-next/src/components/MailTable.js
@@ -0,0 +1,90 @@
+import * as React from "react";
+import Table from "@mui/material/Table";
+import TableBody from "@mui/material/TableBody";
+import TableCell from "@mui/material/TableCell";
+import TableRow from "@mui/material/TableRow";
+import Link from "@mui/material/Link";
+// import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
+import Translate, { translate } from "@docusaurus/Translate";
+
+export default function VersionsTable(props) {
+ // const { siteConfig } = useDocusaurusContext();
+ return (
+ <Table size="small">
+ <TableBody>
+ <TableRow key="header">
+ {["Name", "Scope", "", "", ""].map((header) => (
+ <TableCell
+ className="border-gray-300 font-bold"
+ sx={{ border: 1, color: "inherit" }}
+ align="left"
+ key={header}
+ >
+ <Translate>{header}</Translate>
+ </TableCell>
+ ))}
+ </TableRow>
+ {props.data.map((row, index) => (
+ <TableRow key={index}>
+ <TableCell
+ className="border-gray-300 font-bold"
+ sx={{ border: 1, color: "inherit" }}
+ align="left"
+ >
+ {row.email}
+ </TableCell>
+ <TableCell
+ className="border-gray-300 font-bold"
+ sx={{ border: 1, color: "inherit" }}
+ align="left"
+ >
+ {row.desc}
+ </TableCell>
+ <TableCell
+ className="border-gray-300"
+ sx={{ border: 1, color: "inherit" }}
+ align="left"
+ >
+ <Link
+ className="text-primary"
+ href={row.subscribe}
+ underline="none"
+ target="_blank"
+ >
+ <Translate>Subscribe</Translate>
+ </Link>
+ </TableCell>
+ <TableCell
+ className="border-gray-300"
+ sx={{ border: 1, color: "inherit" }}
+ align="left"
+ >
+ <Link
+ className="text-primary"
+ href={row.unsubscribe}
+ underline="none"
+ target="_blank"
+ >
+ <Translate>Unsubscribe</Translate>
+ </Link>
+ </TableCell>
+ <TableCell
+ className="border-gray-300"
+ sx={{ border: 1, color: "inherit" }}
+ align="left"
+ >
+ <Link
+ className="text-primary"
+ href={row.archives}
+ underline="none"
+ target="_blank"
+ >
+ <Translate>Archives</Translate>
+ </Link>
+ </TableCell>
+ </TableRow>
+ ))}
+ </TableBody>
+ </Table>
+ );
+}
diff --git a/site2/website-next/src/pages/contact.js b/site2/website-next/src/pages/contact.js
new file mode 100644
index 0000000..3f2c7ab
--- /dev/null
+++ b/site2/website-next/src/pages/contact.js
@@ -0,0 +1,119 @@
+import * as React from "react";
+import Layout from "@theme/Layout";
+import MailTable from "../components/MailTable";
+import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
+import Translate, { translate } from "@docusaurus/Translate";
+
+export default function page(props) {
+ const mailingLists = [
+ {
+ email: "users@pulsar.apache.org",
+ desc: "User-related discussions",
+ subscribe: "mailto:users-subscribe@pulsar.apache.org",
+ unsubscribe: "mailto:users-unsubscribe@pulsar.apache.org",
+ archives: "http://mail-archives.apache.org/mod_mbox/pulsar-users/",
+ },
+ {
+ email: "dev@pulsar.apache.org",
+ desc: "Development-related discussions",
+ subscribe: "mailto:dev-subscribe@pulsar.apache.org",
+ unsubscribe: "mailto:dev-unsubscribe@pulsar.apache.org",
+ archives: "http://mail-archives.apache.org/mod_mbox/pulsar-dev/",
+ },
+ {
+ email: "commits@pulsar.apache.org",
+ desc: "All commits to the Pulsar repository",
+ subscribe: "mailto:commits-subscribe@pulsar.apache.org",
+ unsubscribe: "mailto:commits-unsubscribe@pulsar.apache.org",
+ archives: "http://mail-archives.apache.org/mod_mbox/pulsar-commits/",
+ },
+ ];
+ return (
+ <Layout>
+ <div className="tailwind">
+ <div className="my-12 container">
+ <header className="postHeader">
+ <h1>
+ <Translate>Contact</Translate>
+ </h1>
+ <hr />
+ </header>
+ <p>
+ <Translate>
+ There are many ways to get help from the Apache Pulsar community.
+ The mailing lists are the primary place where all Pulsar
+ committers are present. Bugs and feature requests can either be
+ discussed on the dev mailing list or by opening an issue on
+ </Translate>{" "}
+ <a href="https://github.com/apache/pulsar/" target="_blank">
+ Github
+ </a>
+ .
+ </p>
+
+ <h2>
+ <Translate>Mailing Lists</Translate>
+ </h2>
+ <MailTable data={mailingLists}></MailTable>
+ <h2>
+ <Translate>Stack Overflow</Translate>
+ </h2>
+ <p>
+ <Translate>
+ For technical questions, we ask that you post them to
+ </Translate>
+ <a
+ href="https://stackoverflow.com/tags/apache-pulsar"
+ target="_blank"
+ >
+ {" "}
+ Stack Overflow{" "}
+ </a>{" "}
+ <Translate>using the tag “apache-pulsar”.</Translate>
+ </p>
+
+ <h2>
+ <Translate>Slack</Translate>
+ </h2>
+ <p>
+ <Translate>
+ There is a Pulsar slack channel that is used for informal
+ discussions for devs and users.
+ </Translate>
+ </p>
+
+ <p>
+ <Translate>The Slack instance is at </Translate>{" "}
+ <a href="https://apache-pulsar.slack.com/" target="_blank">
+ https://apache-pulsar.slack.com/
+ </a>
+ </p>
+
+ <p>
+ <Translate>You can self-register at </Translate>{" "}
+ <a href="https://apache-pulsar.herokuapp.com/" target="_blank">
+ https://apache-pulsar.herokuapp.com/
+ </a>
+ </p>
+
+ <h2>
+ <Translate>WeChat</Translate>
+ </h2>
+ <p>
+ <Translate>
+ There are several WeChat groups that are used for informal
+ discussions for devs and users.
+ </Translate>
+ </p>
+
+ <p>
+ <Translate>
+ To join these WeChat tech groups, you can add Bot with the WeChat
+ ID: StreamNative_BJ
+ </Translate>
+ </p>
+ </div>
+ </div>
+ </Layout>
+ );
+}
diff --git a/site2/website-next/src/theme/Navbar/index.js b/site2/website-next/src/theme/Navbar/index.js
index dedba7c..0acfcb2 100644
--- a/site2/website-next/src/theme/Navbar/index.js
+++ b/site2/website-next/src/theme/Navbar/index.js
@@ -50,6 +50,10 @@
return apiVersion;
}
+function getLauguage() {
+ return "";
+}
+
function useNavbarItems() {
// TODO temporary casting until ThemeConfig type is improved
return useThemeConfig().navbar.items;
@@ -341,6 +345,16 @@
link: e.to + "?version=" + getVersion(),
};
});
+ } else if (item.label == "Community") {
+ item.items = item.items.map((e) => {
+ if (e.to) {
+ return {
+ ...e,
+ to: e.to.replace(/\/:locale/g, getLauguage()),
+ };
+ }
+ return e;
+ });
}
return <NavbarItem {...item} key={i} />;
})}
diff --git a/site2/website-next/versions.json b/site2/website-next/versions.json
index 5ba060d..f829e1e 100644
--- a/site2/website-next/versions.json
+++ b/site2/website-next/versions.json
@@ -1,28 +1 @@
-[
- "2.9.1",
- "2.9.0",
- "2.8.2",
- "2.8.1",
- "2.8.0",
- "2.7.3",
- "2.7.2",
- "2.7.1",
- "2.7.0",
- "2.6.4",
- "2.6.3",
- "2.6.2",
- "2.6.1",
- "2.6.0",
- "2.5.2",
- "2.5.1",
- "2.5.0",
- "2.4.2",
- "2.4.1",
- "2.4.0",
- "2.3.2",
- "2.3.1",
- "2.3.0",
- "2.2.1",
- "2.2.0",
- "2.1.1-incubating"
-]
+["2.9.1"]