You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "tisonkun (via GitHub)" <gi...@apache.org> on 2023/05/15 09:25:20 UTC

[GitHub] [pulsar-site] tisonkun commented on a diff in pull request #560: PIP-249 site redesign

tisonkun commented on code in PR #560:
URL: https://github.com/apache/pulsar-site/pull/560#discussion_r1193572269


##########
docusaurus.config.js:
##########
@@ -124,298 +125,321 @@ const injectLinkParseForEndpoint = ([, info]) => {
 
 /** @type {import('@docusaurus/types').Config} */
 module.exports = {
-    title: "Apache Pulsar",
-    tagline: "Apache Pulsar is a distributed, open source pub-sub messaging and streaming platform for real-time workloads, managing hundreds of billions of events per day.",
-    url: "https://pulsar.apache.org",
-    baseUrl: baseUrl,
-    onBrokenLinks: "warn",
-    onBrokenMarkdownLinks: "warn",
-    favicon: "img/favicon.ico",
-    organizationName: "apache",
-    projectName: "pulsar",
-    customFields: {
-        githubUrl,
-        oldUrl,
+  title: "Apache Pulsar",
+  tagline:
+    "Apache Pulsar is a distributed, open source pub-sub messaging and streaming platform for real-time workloads, managing hundreds of billions of events per day.",
+  url: "https://pulsar.apache.org",
+  baseUrl: baseUrl,
+  onBrokenLinks: "warn",
+  onBrokenMarkdownLinks: "warn",
+  favicon: "img/favicon.ico",
+  organizationName: "apache",
+  projectName: "pulsar",
+  customFields: {
+    githubUrl,
+    oldUrl,
+  },
+  trailingSlash: true,
+  themeConfig: {
+    /** @type {import('@docusaurus/preset-classic').ThemeConfig} */
+    announcementBar: {
+      id: "summit",
+      content: renderAnnouncementBar(
+        "Pulsar Virtual Summit Europe 2023",
+        "https://pulsar-summit.org/event/europe-2023"
+      ),
+      backgroundColor: "#282826",
+      textColor: "#fff",
+      isCloseable: false,
     },
-    trailingSlash: true,
-    themeConfig: {
-        /** @type {import('@docusaurus/preset-classic').ThemeConfig} */
-        announcementBar: {
-            id: "summit",
-            content: `🚀 Pulsar Virtual Summit Europe 2023 will take place on Tuesday, May 23rd, 2023! <a target="_blank" href="https://events.zoom.us/ev/Ap6rsDg9LeVfmdajJ_eB13HH026J1d_o8OoTKkQnl_jzVl-srhwB~AggLXsr32QYFjq8BlYLZ5I06Dg">Register now for free</a>!`,
-            backgroundColor: "#198fff",
-            textColor: "#fff",
-            isCloseable: true,
+    colorMode: {
+      disableSwitch: true,
+    },
+    navbar: {
+      title: "",
+      logo: {
+        alt: "pulsar logo",
+        src: "img/logo-black.svg",
+      },
+      items: [
+        {
+          type: "dropdown",
+          label: "Get Started",
+          position: "left",
+          items: [
+            {
+              to: "/docs/next/concepts-overview/",
+              activeBaseRegex: "docs/next/concepts-overview/$",
+              label: "Pulsar Concepts",
+            },
+            {
+              to: "/docs/next/",
+              activeBaseRegex: "docs/next/$",
+              label: "Quickstart",
+            },
+            {
+              to: "/ecosystem/",
+              label: "Ecosystem",
+            },
+          ],
         },
-        colorMode: {
-            disableSwitch: false,
+        {
+          type: "doc",
+          docId: "about",
+          position: "left",
+          label: "Docs",
         },
-        navbar: {
-            title: "",
-            logo: {
-                alt: "pulsar logo",
-                src: "img/logo.svg",
-            },
-            items: [
-                {
-                    type: "dropdown",
-                    label: "Get Started",
-                    position: "right",
-                    items: [
-                        {
-                            type: 'doc',
-                            docId: 'concepts-overview',
-                            label: "Pulsar Concepts",
-                        },
-                        {
-                            type: 'doc',
-                            docId: 'about',
-                            label: "Quickstart",
-                        },
-                        {
-                            to: "/ecosystem/",
-                            label: "Ecosystem",
-                        },
-                    ],
-                },
-                {
-                    type: 'doc',
-                    docId: 'about',
-                    position: "right",
-                    label: "Docs",
-                },
-                {
-                    to: "/contribute/",
-                    position: "right",
-                    label: "Contribute",
-                },
-                {
-                    type: "dropdown",
-                    label: "Community",
-                    position: "right",
-                    className: "community-dropdown",
-                    items: [
-                        {
-                            to: "/community#section-welcome",
-                            label: "Welcome",
-                            className: "scroll-link scroll-welcome",
-                            id: "scroll-welcome",
-                        },
-                        {
-                            to: "/community#section-discussions",
-                            label: "Discussions",
-                            className: "scroll-link scroll-discussions",
-                            id: "scroll-discussions",
-                        },
-                        {
-                            to: "/community#section-governance",
-                            label: "Governance",
-                            className: "scroll-link",
-                            id: "scroll-governance",
-                        },
-                        {
-                            to: "/community#section-community",
-                            label: "Meet the Community",
-                            className: "scroll-link",
-                            id: "scroll-community",
-                        },
-                        {
-                            to: "/community#section-contribute",
-                            label: "Contribute",
-                            className: "scroll-link",
-                            id: "scroll-contribute",
-                        },
-                        {
-                            to: "https://github.com/apache/pulsar/wiki",
-                            label: "Wiki",
-                        },
-                        {
-                            to: "https://github.com/apache/pulsar/issues",
-                            label: "Issue Tracking",
-                        },
-                    ],
-                },
-                {
-                    type: "dropdown",
-                    label: "Learn",
-                    position: "right",
-                    items: [
-                        {
-                            to: "/blog",
-                            label: "Blog",
-                        },
-                        {
-                            to: "/case-studies",
-                            label: "Case Studies",
-                        },
-                        {
-                            to: "/resources",
-                            label: "Resources",
-                        },
-                        {
-                            to: "/events",
-                            label: "Events",
-                        },
-                    ],
-                },
-                {
-                    to: "/download",
-                    label: "Download",
-                    position: "right",
-                    className: "download-btn pill-btn",
-                },
-                {
-                    href: "https://github.com/apache/pulsar",
-                    label: "Github",
-                    position: "right",
-                    className: "github-nav",
-                },
-            ],
+        {
+          to: "/contribute/",
+          position: "left",
+          label: "Contribute",
         },
-        footer: {
-            logo: {alt: "Pulsar Logo", src: "img/pulsar-white.svg", href: "/"},
-            links: [
-                {
-                    title: "Apache Foundation.",
-                    items: [
-                        {html: `<img class="footer-apache-logo" src="/img/Apache_Feather_Logo.svg" alt="" width="20">`},
-                        {label: "Foundation", href: "https://www.apache.org/"},
-                        {label: "Events", href: "https://www.apache.org/events/current-event.html"},
-                        {label: "License", href: "https://www.apache.org/licenses/"},
-                        {label: "Thanks", href: "https://www.apache.org/foundation/thanks"},
-                        {label: "Security", href: "https://www.apache.org/security"},
-                        {label: "Sponsorship", href: "https://www.apache.org/foundation/sponsorship"},
-                        {label: "Privacy", href: "https://www.apache.org/foundation/policies/privacy.html"},
-                    ],
-                },
-                {
-                    items: [
-                        {
-                            html: `<div><small><strong>Apache Pulsar is available under the <a href="https://www.apache.org/licenses/LICENSE-2.0" target="_blank">Apache License, version 2.0.</a></strong></small></div>
-                            <div>Apache Pulsar is an open-source, distributed messaging and streaming platform built for the cloud.</div>`,
-                        },
-                    ],
-                },
-            ],
-            copyright: `<p>Apache Pulsar is available under the Apache License, version 2.0.</p>
-                        <p>Copyright © ${new Date().getFullYear()} The Apache Software Foundation. All Rights Reserved. Apache, Pulsar, Apache Pulsar, and the Apache feather logo are trademarks or registered trademarks of The Apache Software Foundation.</p>`,
+        {
+          type: "dropdown",
+          label: "Community",
+          position: "left",
+          className: "community-dropdown",
+          items: [
+            {
+              to: "/community",
+              activeBaseRegex: "^$",
+              label: "Welcome",
+              className: "scroll-link scroll-welcome",
+              id: "scroll-welcome",
+            },
+            {
+              to: "/community#section-discussions",
+              activeBaseRegex: "^$",
+              label: "Discussions",
+              className: "scroll-link scroll-discussions",
+              id: "scroll-discussions",
+            },
+            {
+              to: "/community#section-governance",
+              activeBaseRegex: "^$",
+              label: "Governance",
+              className: "scroll-link",
+              id: "scroll-governance",
+            },
+            {
+              to: "/community#section-community",
+              activeBaseRegex: "^$",
+              label: "Meet the Community",
+              className: "scroll-link",
+              id: "scroll-community",
+            },
+            {
+              to: "/community#section-contribute",
+              activeBaseRegex: "^$",
+              label: "Contribute",
+              className: "scroll-link",
+              id: "scroll-contribute",
+            },
+            {
+              to: "https://github.com/apache/pulsar/wiki",
+              label: "Wiki",
+            },
+            {
+              to: "https://github.com/apache/pulsar/issues",
+              label: "Issue Tracking",
+            },
+          ],
         },
-        prism: {
-            theme: require("prism-react-renderer/themes/dracula"),
-            additionalLanguages: [
-                "csharp",
-                "groovy",
-                "http",
-                "ini",
-                "java",
-                "powershell",
-                "properties",
-                "protobuf",
-                "yaml",
-            ],
+        {
+          type: "dropdown",
+          label: "Learn",
+          position: "left",
+          items: [
+            {
+              to: "/blog",
+              label: "Blog",
+            },
+            {
+              to: "/case-studies",
+              label: "Case Studies",
+            },
+            {
+              to: "/resources",
+              label: "Resources",
+            },
+            {
+              to: "/events",
+              label: "Events",
+            },
+          ],
         },
-        algolia: {
-            appId: "WK2YL0SALL",
-            apiKey: "42d24d221fbd8eb59804a078208aaec0",
-            indexName: "apache_pulsar",
+        {
+          to: "/download",
+          label: "Download",
+          position: "right",
+          className: "download-btn pill-btn grey",
         },
+      ],
     },
-    presets: [
-        [
-            "@docusaurus/preset-classic",
-            /** @type {import('@docusaurus/preset-classic').Options} */
+    footer: {
+      logo: { alt: "Pulsar Logo", src: "img/pulsar-white.svg", href: "/" },
+      links: [
+        {
+          items: [
+            { label: "Foundation", href: "https://www.apache.org/" },
             {
-                docs: {
-                    path: "docs",
-                    sidebarPath: require.resolve("./sidebars.js"),
-                    editUrl: `${githubSiteUrl}/edit/main`,
-                    remarkPlugins: [
-                        linkifyRegex(
-                            /{\@inject\:\s?(((?!endpoint)[^}])+):([^}]+):([^}]+)}/,
-                            injectLinkParse
-                        ),
-                        linkifyRegex(
-                            /{\@inject\:\s?endpoint\|([^}]+)}/,
-                            injectLinkParseForEndpoint
-                        ),
-                        math,
-                        ],
-                    rehypePlugins: [katex],
-                    versions: versionsMap,
-                    onlyIncludeVersions: buildVersions || ["current"],
-                },
-                blog: {
-                    showReadingTime: true,
-                    editUrl: `${githubSiteUrl}/edit/main/`,
-                },
-                theme: {
-                    customCss: require.resolve("./src/css/custom.css"),
-                },
-                googleAnalytics: {
-                    trackingID: "UA-102219959-1",
-                },
+              label: "Events",
+              href: "https://www.apache.org/events/current-event.html",
             },
-        ],
-    ],
-    plugins: [
-        "./postcss-tailwind-loader",
-        [
-            'content-docs',
-            /** @type {import('@docusaurus/plugin-content-docs').Options} */
-            ({
-                id: 'contribute',
-                path: 'contribute',
-                routeBasePath: 'contribute',
-                showLastUpdateAuthor: true,
-                showLastUpdateTime: true,
-                sidebarPath: require.resolve('./sidebarsDevelopment.js'),
-                editUrl: `${githubSiteUrl}/edit/main`,
-            }),
-        ],
-        [
-            "content-docs",
-            /** @type {import('@docusaurus/plugin-content-docs').Options} */
-            ({
-                id: "release-notes",
-                path: "release-notes",
-                routeBasePath: "release-notes",
-                editUrl: `${githubSiteUrl}/edit/main`,
-                sidebarPath: require.resolve("./sidebarsReleaseNotes.js"),
-            }),
-        ],
-        [
-            "content-docs",
-            /** @type {import('@docusaurus/plugin-content-docs').Options} */
-            ({
-                id: "security",
-                path: "security",
-                routeBasePath: "security",
-                sidebarPath: false,
-            }),
-        ],
-        [
-          "content-docs",
-          /** @type {import('@docusaurus/plugin-content-docs').Options} */
-          ({
-            id: "client-feature-matrix",
-            path: "client-feature-matrix",
-            routeBasePath: "client-feature-matrix",
-            sidebarPath: false,
-          }),
-        ],
-    ],
-    scripts: [
-        {src: "/js/sine-waves.min.js", async: true},
-        "/js/matomo-agent.js",
-    ],
-    clientModules: [require.resolve('./matomoClientModule.ts')],
-    stylesheets: [
+          ],
+        },
         {
-          href: 'https://cdn.jsdelivr.net/npm/katex@0.13.24/dist/katex.min.css',
-          type: 'text/css',
-          integrity:
-            'sha384-odtC+0UGzzFL/6PNoE8rX/SPcQDXBJ+uRepguP4QkPCm2LBxH3FA3y+fKSiJ+AmM',
-          crossorigin: 'anonymous',
+          items: [
+            { label: "License", href: "https://www.apache.org/licenses/" },
+            {
+              label: "Thanks",
+              href: "https://www.apache.org/foundation/thanks",
+            },
+            {
+              label: "Sponsorship",
+              href: "https://www.apache.org/foundation/sponsorship",
+            },
+          ],
+        },
+        {
+          items: [
+            { label: "Security", href: "https://www.apache.org/security" },
+            {
+              label: "Privacy",
+              href: "https://www.apache.org/foundation/policies/privacy.html",
+            },
+          ],
         },
+        {
+          items: [
+            {
+              html: `
+                              <div class="social-icons">
+                                <a target="_blank" href="https://communityinviter.com/apps/apache-pulsar/apache-pulsar"><img src="/img/slack-white.svg" width="26"></a>
+                                <a target="_blank" href="https://github.com/apache/pulsar/"><img src="/img/github-white.svg" width="26"></a>
+                              </div>
+                              `,
+            },
+          ],
+        },
+      ],
+      copyright: `
+                            <div><img class="footer-apache-logo" src="/img/feather-logo-white.svg" alt="" width="20">Apache Foundation</div>
+                            <p>Apache Pulsar is available under the Apache License, version 2.0. Apache Pulsar is an open-source, distributed messaging and streaming platform built for the cloud.</p>
+                            <p>Copyright © ${new Date().getFullYear()} The Apache Software Foundation. All Rights Reserved. Apache, Pulsar, Apache Pulsar, and the Apache feather logo are trademarks or registered trademarks of The Apache Software Foundation.</p>
+                        `,
+    },
+    prism: {
+      theme: require("prism-react-renderer/themes/dracula"),
+      additionalLanguages: [
+        "csharp",
+        "groovy",
+        "http",
+        "ini",
+        "java",
+        "powershell",
+        "properties",
+        "protobuf",
+        "yaml",
       ],
+    },
+    algolia: {
+      appId: "WK2YL0SALL",
+      apiKey: "42d24d221fbd8eb59804a078208aaec0",
+      indexName: "apache_pulsar",
+    },
+  },
+  presets: [
+    [
+      "@docusaurus/preset-classic",
+      /** @type {import('@docusaurus/preset-classic').Options} */
+      {
+        docs: {
+          path: "docs",
+          sidebarPath: require.resolve("./sidebars.js"),
+          editUrl: `${githubSiteUrl}/edit/main`,
+          remarkPlugins: [
+            linkifyRegex(
+              /{\@inject\:\s?(((?!endpoint)[^}])+):([^}]+):([^}]+)}/,
+              injectLinkParse
+            ),
+            linkifyRegex(
+              /{\@inject\:\s?endpoint\|([^}]+)}/,
+              injectLinkParseForEndpoint
+            ),
+            math,
+          ],
+          rehypePlugins: [katex],
+          versions: versionsMap,
+          onlyIncludeVersions: buildVersions || ["current"],
+        },
+        blog: {
+          showReadingTime: true,
+          editUrl: `${githubSiteUrl}/edit/main/`,
+        },
+        theme: {
+          customCss: [
+            require.resolve("./src/css/custom.css"),
+            require.resolve("./src/css/docs.css"),
+            require.resolve("./src/css/base-table.css"),
+            require.resolve("./src/css/typography.css"),
+            require.resolve("./src/css/announcement-bar.css"),
+            require.resolve("./src/css/navbar.css"),
+            require.resolve("./src/css/footer.css"),
+            require.resolve("./src/css/variables.css"),
+          ],
+        },
+        googleAnalytics: {
+          trackingID: "UA-102219959-1",
+        },
+      },
+    ],
+  ],
+  plugins: [
+    [
+      "content-docs",

Review Comment:
   It seems we are missing the `contribute` instance here:
   
   ```js
           [
               'content-docs',
               /** @type {import('@docusaurus/plugin-content-docs').Options} */
               ({
                   id: 'contribute',
                   path: 'contribute',
                   routeBasePath: 'contribute',
                   showLastUpdateAuthor: true,
                   showLastUpdateTime: true,
                   sidebarPath: require.resolve('./sidebarsDevelopment.js'),
                   editUrl: `${githubSiteUrl}/edit/main`,
               }),
           ],
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org