This is an automated email from the ASF dual-hosted git repository.
guangning pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new 74b322c [website][upgrade] feat: initial framework (#11770)
74b322c is described below
commit 74b322c7d6548cc4099cfbe43c3fa1e540071329
Author: Li Li <[email protected]>
AuthorDate: Fri Aug 27 09:17:00 2021 +0800
[website][upgrade] feat: initial framework (#11770)
### Motivation
website upgrade
### Modifications
Initial framework for website upgrade
---
site2/.gitignore | 2 +
site2/website-next/.gitignore | 22 ++++++
site2/website-next/README.md | 33 ++++++++
site2/website-next/babel.config.js | 3 +
site2/website-next/blog/2021-08-25-welcome.md | 7 ++
site2/website-next/docs/intro.md | 5 ++
site2/website-next/docusaurus.config.js | 86 +++++++++++++++++++++
site2/website-next/package.json | 40 ++++++++++
site2/website-next/sidebars.js | 26 +++++++
.../src/components/HomepageFeatures.js | 59 ++++++++++++++
.../src/components/HomepageFeatures.module.css | 13 ++++
site2/website-next/src/css/custom.css | 29 +++++++
site2/website-next/src/pages/index.js | 40 ++++++++++
site2/website-next/src/pages/index.module.css | 25 ++++++
site2/website-next/src/pages/markdown-page.md | 7 ++
site2/website-next/static/.nojekyll | 0
site2/website-next/static/img/favicon.ico | Bin 0 -> 1150 bytes
site2/website-next/static/img/logo.svg | 1 +
18 files changed, 398 insertions(+)
diff --git a/site2/.gitignore b/site2/.gitignore
index bd5e769..f7825d3 100644
--- a/site2/.gitignore
+++ b/site2/.gitignore
@@ -14,3 +14,5 @@ website/static/swagger/master/*
website/static/swagger/restApiVersions.json
website/static/swagger/*/v*/*.json
+
+website-tmp*/
\ No newline at end of file
diff --git a/site2/website-next/.gitignore b/site2/website-next/.gitignore
new file mode 100644
index 0000000..50b6375
--- /dev/null
+++ b/site2/website-next/.gitignore
@@ -0,0 +1,22 @@
+# Dependencies
+/node_modules
+
+# Production
+/build
+build/
+# Generated files
+.docusaurus
+.cache-loader
+
+# Misc
+.DS_Store
+.env.local
+.env.development.local
+.env.test.local
+.env.production.local
+
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+
+bak/
\ No newline at end of file
diff --git a/site2/website-next/README.md b/site2/website-next/README.md
new file mode 100644
index 0000000..231a499
--- /dev/null
+++ b/site2/website-next/README.md
@@ -0,0 +1,33 @@
+# Website
+
+This website is built using [Docusaurus 2](https://docusaurus.io/), a modern
static website generator.
+
+## Installation
+
+```console
+yarn install
+```
+
+## Local Development
+
+```console
+yarn start
+```
+
+This command starts a local development server and opens up a browser window.
Most changes are reflected live without having to restart the server.
+
+## Build
+
+```console
+yarn build
+```
+
+This command generates static content into the `build` directory and can be
served using any static contents hosting service.
+
+## Deployment
+
+```console
+GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy
+```
+
+If you are using GitHub pages for hosting, this command is a convenient way to
build the website and push to the `gh-pages` branch.
diff --git a/site2/website-next/babel.config.js
b/site2/website-next/babel.config.js
new file mode 100644
index 0000000..e00595d
--- /dev/null
+++ b/site2/website-next/babel.config.js
@@ -0,0 +1,3 @@
+module.exports = {
+ presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
+};
diff --git a/site2/website-next/blog/2021-08-25-welcome.md
b/site2/website-next/blog/2021-08-25-welcome.md
new file mode 100644
index 0000000..00acf22
--- /dev/null
+++ b/site2/website-next/blog/2021-08-25-welcome.md
@@ -0,0 +1,7 @@
+---
+slug: welcome
+title: Welcome
+tags: [welcome, apache, pulsar]
+---
+
+Welcome to Apache Pulsar.
\ No newline at end of file
diff --git a/site2/website-next/docs/intro.md b/site2/website-next/docs/intro.md
new file mode 100644
index 0000000..95ef9d6
--- /dev/null
+++ b/site2/website-next/docs/intro.md
@@ -0,0 +1,5 @@
+---
+sidebar_position: 1
+---
+
+Welcome to Apache Pulsar.
\ No newline at end of file
diff --git a/site2/website-next/docusaurus.config.js
b/site2/website-next/docusaurus.config.js
new file mode 100644
index 0000000..fe43a25
--- /dev/null
+++ b/site2/website-next/docusaurus.config.js
@@ -0,0 +1,86 @@
+const lightCodeTheme = require("prism-react-renderer/themes/github");
+const darkCodeTheme = require("prism-react-renderer/themes/dracula");
+
+/** @type {import('@docusaurus/types').DocusaurusConfig} */
+module.exports = {
+ title: "Apache Pulsar",
+ tagline:
+ "Apache Pulsar is a cloud-native, distributed messaging and streaming
platform originally created at Yahoo! and now a top-level Apache Software
Foundation project",
+ url: "https://your-docusaurus-test-site.com",
+ baseUrl: "/",
+ onBrokenLinks: "throw",
+ onBrokenMarkdownLinks: "warn",
+ favicon: "img/favicon.ico",
+ organizationName: "facebook", // Usually your GitHub org/user name.
+ projectName: "docusaurus", // Usually your repo name.
+ themeConfig: {
+ navbar: {
+ title: "",
+ logo: {
+ alt: "",
+ src: "img/logo.svg",
+ },
+ items: [
+ {
+ type: "doc",
+ docId: "intro",
+ position: "left",
+ label: "Docs",
+ },
+ { to: "/blog", label: "Blog", position: "left" },
+ {
+ href: "https://github.com/apache/pulsar",
+ label: "GitHub",
+ position: "right",
+ },
+ ],
+ },
+ footer: {
+ style: "dark",
+ links: [
+ {
+ title: "More",
+ items: [
+ {
+ label: "Docs",
+ to: "/docs/intro",
+ },
+ {
+ label: "Blog",
+ to: "/blog",
+ },
+ {
+ label: "GitHub",
+ href: "https://github.com/apache/pulsar",
+ },
+ ],
+ },
+ ],
+ copyright: `Copyright © ${new Date().getFullYear()} Apache Pulsar, Inc.`,
+ },
+ prism: {
+ theme: lightCodeTheme,
+ darkTheme: darkCodeTheme,
+ },
+ },
+ presets: [
+ [
+ "@docusaurus/preset-classic",
+ {
+ docs: {
+ sidebarPath: require.resolve("./sidebars.js"),
+ // Please change this to your repo.
+ editUrl: "https://github.com/apache/pulsar",
+ },
+ blog: {
+ showReadingTime: true,
+ // Please change this to your repo.
+ editUrl: "https://github.com/apache/pulsar",
+ },
+ theme: {
+ customCss: require.resolve("./src/css/custom.css"),
+ },
+ },
+ ],
+ ],
+};
diff --git a/site2/website-next/package.json b/site2/website-next/package.json
new file mode 100644
index 0000000..268f4dc
--- /dev/null
+++ b/site2/website-next/package.json
@@ -0,0 +1,40 @@
+{
+ "name": "website-next",
+ "version": "0.0.0",
+ "private": true,
+ "scripts": {
+ "docusaurus": "docusaurus",
+ "start": "docusaurus start",
+ "build": "docusaurus build",
+ "swizzle": "docusaurus swizzle",
+ "deploy": "docusaurus deploy",
+ "clear": "docusaurus clear",
+ "serve": "docusaurus serve",
+ "write-translations": "docusaurus write-translations",
+ "write-heading-ids": "docusaurus write-heading-ids"
+ },
+ "dependencies": {
+ "@docusaurus/core": "2.0.0-beta.4",
+ "@docusaurus/preset-classic": "2.0.0-beta.4",
+ "@mdx-js/react": "^1.6.21",
+ "@svgr/webpack": "^5.5.0",
+ "clsx": "^1.1.1",
+ "file-loader": "^6.2.0",
+ "prism-react-renderer": "^1.2.1",
+ "react": "^17.0.1",
+ "react-dom": "^17.0.1",
+ "url-loader": "^4.1.1"
+ },
+ "browserslist": {
+ "production": [
+ ">0.5%",
+ "not dead",
+ "not op_mini all"
+ ],
+ "development": [
+ "last 1 chrome version",
+ "last 1 firefox version",
+ "last 1 safari version"
+ ]
+ }
+}
\ No newline at end of file
diff --git a/site2/website-next/sidebars.js b/site2/website-next/sidebars.js
new file mode 100644
index 0000000..981a73c
--- /dev/null
+++ b/site2/website-next/sidebars.js
@@ -0,0 +1,26 @@
+/**
+ * Creating a sidebar enables you to:
+ - create an ordered group of docs
+ - render a sidebar for each doc of that group
+ - provide next/previous navigation
+
+ The sidebars can be generated from the filesystem, or explicitly defined here.
+
+ Create as many sidebars as you want.
+ */
+
+module.exports = {
+ // By default, Docusaurus generates a sidebar from the docs folder structure
+ tutorialSidebar: [{type: 'autogenerated', dirName: '.'}],
+
+ // But you can create a sidebar manually
+ /*
+ tutorialSidebar: [
+ {
+ type: 'category',
+ label: 'Tutorial',
+ items: ['hello'],
+ },
+ ],
+ */
+};
diff --git a/site2/website-next/src/components/HomepageFeatures.js
b/site2/website-next/src/components/HomepageFeatures.js
new file mode 100644
index 0000000..68ac525
--- /dev/null
+++ b/site2/website-next/src/components/HomepageFeatures.js
@@ -0,0 +1,59 @@
+import React from "react";
+import clsx from "clsx";
+import styles from "./HomepageFeatures.module.css";
+
+const FeatureList = [
+ {
+ title: "Pulsar Functions",
+ // Svg: require("../../static/img/undraw_docusaurus_mountain.svg").default,
+ description: (
+ <>
+ Easy to deploy, lightweight compute process, developer-friendly APIs,
no
+ need to run your own stream processing engine.
+ </>
+ ),
+ },
+ {
+ title: "Proven in production",
+ // Svg: require("../../static/img/undraw_docusaurus_tree.svg").default,
+ description: (
+ <>
+ Run in production at Yahoo! scale for over 5 years, with millions of
+ messages per second across millions of topics.
+ </>
+ ),
+ },
+ {
+ title: "Horizontally scalable",
+ // Svg: require("../../static/img/undraw_docusaurus_react.svg").default,
+ description: <>Expand capacity seamlessly to hundreds of nodes.</>,
+ },
+];
+
+function Feature({ Svg, title, description }) {
+ return (
+ <div className={clsx("col col--4")}>
+ {/* <div className="text--center">
+ <Svg className={styles.featureSvg} alt={title} />
+ </div> */}
+ <div className="text--center padding-horiz--md">
+ <h3>{title}</h3>
+ <p>{description}</p>
+ </div>
+ </div>
+ );
+}
+
+export default function HomepageFeatures() {
+ return (
+ <section className={styles.features}>
+ <div className="container">
+ <div className="row">
+ {FeatureList.map((props, idx) => (
+ <Feature key={idx} {...props} />
+ ))}
+ </div>
+ </div>
+ </section>
+ );
+}
diff --git a/site2/website-next/src/components/HomepageFeatures.module.css
b/site2/website-next/src/components/HomepageFeatures.module.css
new file mode 100644
index 0000000..9dcb82c
--- /dev/null
+++ b/site2/website-next/src/components/HomepageFeatures.module.css
@@ -0,0 +1,13 @@
+/* stylelint-disable docusaurus/copyright-header */
+
+.features {
+ display: flex;
+ align-items: center;
+ padding: 2rem 0;
+ width: 100%;
+}
+
+.featureSvg {
+ height: 200px;
+ width: 200px;
+}
diff --git a/site2/website-next/src/css/custom.css
b/site2/website-next/src/css/custom.css
new file mode 100644
index 0000000..ff2d075
--- /dev/null
+++ b/site2/website-next/src/css/custom.css
@@ -0,0 +1,29 @@
+/* stylelint-disable docusaurus/copyright-header */
+/**
+ * Any CSS included here will be global. The classic template
+ * bundles Infima by default. Infima is a CSS framework designed to
+ * work well for content-centric websites.
+ */
+
+/* You can override the default Infima variables here. */
+:root {
+ --ifm-color-primary: #198fff;
+ --ifm-color-primary-dark: rgb(33, 175, 144);
+ --ifm-color-primary-darker: rgb(31, 165, 136);
+ --ifm-color-primary-darkest: rgb(26, 136, 112);
+ --ifm-color-primary-light: rgb(70, 203, 174);
+ --ifm-color-primary-lighter: rgb(102, 212, 189);
+ --ifm-color-primary-lightest: rgb(146, 224, 208);
+ --ifm-code-font-size: 95%;
+}
+
+.docusaurus-highlight-code-line {
+ background-color: rgba(0, 0, 0, 0.1);
+ display: block;
+ margin: 0 calc(-1 * var(--ifm-pre-padding));
+ padding: 0 var(--ifm-pre-padding);
+}
+
+html[data-theme='dark'] .docusaurus-highlight-code-line {
+ background-color: rgba(0, 0, 0, 0.3);
+}
diff --git a/site2/website-next/src/pages/index.js
b/site2/website-next/src/pages/index.js
new file mode 100644
index 0000000..acfcdb2
--- /dev/null
+++ b/site2/website-next/src/pages/index.js
@@ -0,0 +1,40 @@
+import React from 'react';
+import clsx from 'clsx';
+import Layout from '@theme/Layout';
+import Link from '@docusaurus/Link';
+import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
+import styles from './index.module.css';
+import HomepageFeatures from '../components/HomepageFeatures';
+
+function HomepageHeader() {
+ const {siteConfig} = useDocusaurusContext();
+ return (
+ <header className={clsx('hero hero--primary', styles.heroBanner)}>
+ <div className="container">
+ <h1 className="hero__title">{siteConfig.title}</h1>
+ <p className="hero__subtitle">{siteConfig.tagline}</p>
+ <div className={styles.buttons}>
+ <Link
+ className="button button--secondary button--lg"
+ to="/docs/intro">
+ Read️ the Docs
+ </Link>
+ </div>
+ </div>
+ </header>
+ );
+}
+
+export default function Home() {
+ const {siteConfig} = useDocusaurusContext();
+ return (
+ <Layout
+ title={`Hello from ${siteConfig.title}`}
+ description="Description will go into a meta tag in <head />">
+ <HomepageHeader />
+ <main>
+ <HomepageFeatures />
+ </main>
+ </Layout>
+ );
+}
diff --git a/site2/website-next/src/pages/index.module.css
b/site2/website-next/src/pages/index.module.css
new file mode 100644
index 0000000..5c0d4f6
--- /dev/null
+++ b/site2/website-next/src/pages/index.module.css
@@ -0,0 +1,25 @@
+/* stylelint-disable docusaurus/copyright-header */
+
+/**
+ * CSS files with the .module.css suffix will be treated as CSS modules
+ * and scoped locally.
+ */
+
+.heroBanner {
+ padding: 4rem 0;
+ text-align: center;
+ position: relative;
+ overflow: hidden;
+}
+
+@media screen and (max-width: 966px) {
+ .heroBanner {
+ padding: 2rem;
+ }
+}
+
+.buttons {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
diff --git a/site2/website-next/src/pages/markdown-page.md
b/site2/website-next/src/pages/markdown-page.md
new file mode 100644
index 0000000..9756c5b
--- /dev/null
+++ b/site2/website-next/src/pages/markdown-page.md
@@ -0,0 +1,7 @@
+---
+title: Markdown page example
+---
+
+# Markdown page example
+
+You don't need React to write simple standalone pages.
diff --git a/site2/website-next/static/.nojekyll
b/site2/website-next/static/.nojekyll
new file mode 100644
index 0000000..e69de29
diff --git a/site2/website-next/static/img/favicon.ico
b/site2/website-next/static/img/favicon.ico
new file mode 100644
index 0000000..a3d664e
Binary files /dev/null and b/site2/website-next/static/img/favicon.ico differ
diff --git a/site2/website-next/static/img/logo.svg
b/site2/website-next/static/img/logo.svg
new file mode 100644
index 0000000..0448785
--- /dev/null
+++ b/site2/website-next/static/img/logo.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 223.44 43.08"><g
data-name="Layer 2"><g data-name="Layer 1"><path d="M61 13.73H46.09C42.06 6
37.8 0 32 0c-7.55 0-11.1 6.59-14.53 13l-.3.56H0v3.81h10c3.53 0 4.25 1.19 4.25
1.19-2.77 4.3-6.1 8.55-11.65 8.55H0v4h2.62c10.76 0 15.46-8.73 19.23-15.74C25.31
8.91 27.72 5 32 5c4.44 0 9.11 9.66 13.22 18.19.6 1.24 1.21 2.51 1.83
3.77-15.76.5-23.27 4.19-29.38 7.2-4.47 2.2-8 4.93-13.81 4.93H0v4h3.83c7 0
11.36-2.16 16-4.45 6.43-3.16 13.72-6.74 30.9- [...]
\ No newline at end of file