Skip to content

Commit

Permalink
Add a sentence and link on data driven pages that points to how to co…
Browse files Browse the repository at this point in the history
…ntribute updates
  • Loading branch information
visortelle committed Mar 2, 2024
1 parent 9154971 commit 86c343f
Show file tree
Hide file tree
Showing 11 changed files with 74 additions and 39 deletions.
59 changes: 28 additions & 31 deletions contribute/site-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,38 +77,35 @@ If you're gonna to debug the reference generation process, read the [reference-d

### How to update data-driven pages?

The following pages contain data-driven tables:

* [Case studies](pathname:///case-studies)
* data/users.js
* src/pages/case-studies.js
* [Downloads](pathname:///download)
* releases.json
* data/connectors.js
* data/release-cpp.js
* data/release-pulsar-manager.js
* data/release-pulsar-adapters.js
* src/components/download.tsx
* src/pages/download.mdx
* [Ecosystem](pathname:///ecosystem)
* data/ecosystem.js
* src/pages/ecosystem.js
* [Events](pathname:///events)
* data/events.js
* src/pages/events.js
* [Release notes](pathname:///release-notes)
You can update it by clicking on one of the **✍️ Edit <file_name>** links below and submitting a Pull Request.

* **Case Studies** [/case-studies](pathname:///case-studies)
* [✍️ Edit case-studies.ts](https://github.com/apache/pulsar-site/edit/main/data/case-studies.ts)
* **Powered by** [/powered-by](pathname:///powered-by)
* [✍️ Edit powered-by.ts](https://github.com/apache/pulsar-site/edit/main/data/powered-by.ts)
* **Ecosystem** [/ecosystem](pathname:///ecosystem)
* [✍️ Edit ecosystem.ts](https://github.com/apache/pulsar-site/edit/main/data/ecosystem.ts)
* **Events** [/events](pathname:///events)
* [✍️ Edit events.ts](https://github.com/apache/pulsar-site/edit/main/data/events.ts)
* **Resources** [/resources](pathname:///resources)
* [✍️ Edit resources.ts](https://github.com/apache/pulsar-site/edit/main/data/resources.ts)
* **Team** [/team](pathname:///team)
* [✍️ Edit team.js](https://github.com/apache/pulsar-site/edit/main/data/team.js)

PMC members can generate the `team.js` file as [lhotari](https://github.com/lhotari) did in https://github.com/apache/pulsar-site/pull/387.
* **Downloads** [/downloads](pathname:///download)
* [✍️ Edit releases.json](https://github.com/apache/pulsar-site/edit/main/releases.json)
* [✍️ Edit connectors.js](https://github.com/apache/pulsar-site/edit/main/data/connectors.js)
* [✍️ Edit release-cpp.js](https://github.com/apache/pulsar-site/edit/main/data/release-cpp.js)
* [✍️ Edit release-pulsar-manager.js](https://github.com/apache/pulsar-site/edit/main/data/release-pulsar-manager.js)
* [✍️ Edit release-pulsar-adapters.js](https://github.com/apache/pulsar-site/edit/main/data/release-pulsar-adapters.js)
* [✍️ Edit download.tsx](https://github.com/apache/pulsar-site/edit/main/src/components/download.tsx)
* [✍️ Edit download.mdx](https://github.com/apache/pulsar-site/edit/main/src/pages/download.mdx)
* **Release notes** [/release-notes](pathname:///release-notes)
* data/release-*.js
* release-notes/
* src/components/ClientReleaseTable.js
* src/components/PulsarReleaseTable.js
* [Resources](pathname:///resources)
* data/resources.js
* src/pages/resources.js
* [Team](pathname:///team)
* data/team.js
* src/pages/team.js
* [Client feature matrix](pathname:///client-feature-matrix)
* data/matrix.js
* client-feature-matrix/index.mdx

Additionally, PMC members can generate the `team.js` file as @lhotari did in https://github.com/apache/pulsar-site/pull/387.
* **Client feature matrix** [/client-feature-matrix](pathname:///client-feature-matrix)
* [✍️ Edit matrix.js](https://github.com/apache/pulsar-site/edit/main/data/matrix.js)
* [✍️ Edit client-feature-matrix/index.mdx](https://github.com/apache/pulsar-site/edit/main/client-feature-matrix/index.mdx)
6 changes: 3 additions & 3 deletions data/users.tsx → data/powered-by.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
type Users = {
type PoweredByUser = {
name: string,
url: string,
logo: string,
logo?: string,
logo_white?: boolean,
}

const users: Users[] = [
const users: PoweredByUser[] = [
{
name: "Kingsoft Cloud",
url: "https://www.ksyun.com/",
Expand Down
3 changes: 3 additions & 0 deletions src/components/pages/CaseStudiesPage/CaseStudiesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Input from "@site/src/components/ui/Input/Input";
import Select from "@site/src/components/ui/Select/Select";
import Page from "@site/src/components/ui/Page/Page";
import s from './CaseStudiesPage.module.css';
import ContributeDataDrivenPage from "../../ui/ContributeDataDrivenPage/ContributeDataDrivenPage";

type CategoryFilterOption = data.Category | 'any';
const categoryFilterOptions = ['any', ...data.categories] as const;
Expand All @@ -23,6 +24,8 @@ const CaseStudiesPage: React.FC = () => {
<section className={s.Header}>
<h1 style={{ color: 'var(--color-primary-dark)', marginBottom: '0'}}>Case Studies</h1>
<p>Organizations around the globe rely on Apache Pulsar to manage their most demanding real-time requirements.</p>

<ContributeDataDrivenPage />
</section>

<section>
Expand Down
2 changes: 2 additions & 0 deletions src/components/pages/EcosystemPage/EcosystemPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Input from "@site/src/components/ui/Input/Input";
import Select from "@site/src/components/ui/Select/Select";
import Page from "@site/src/components/ui/Page/Page";
import s from './EcosystemPage.module.css';
import ContributeDataDrivenPage from "../../ui/ContributeDataDrivenPage/ContributeDataDrivenPage";

type CategoryFilterOption = data.Category | 'any';
const categoryFilterOptions = ['any', ...data.categories] as const;
Expand All @@ -24,6 +25,7 @@ const EcosystemPage: React.FC = () => {
<h1>Ecosystem</h1>
<p>To build better streaming data pipelines and event-driven applications, you can use the powerful extensions to Pulsar, including <a href="/docs/next/io-overview">connectors</a>, protocol handlers, tools, and more. Additionally, you can develop applications using <a href="/docs/next/client-libraries">client libraries</a>.</p>
<p>This page lists both built-in and third-party tools. Note that some of the third-party tools were not tested throughly by the community, and may not work as expected. Only open source components with an <a href="https://opensource.org/licenses">OSI&nbsp;approved licenses</a> are allowed. </p>
<ContributeDataDrivenPage />
</section>

<section>
Expand Down
3 changes: 2 additions & 1 deletion src/components/pages/EventsPage/EventsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Page from "@site/src/components/ui/Page/Page";
import s from './EventsPage.module.css';
import Button from "@site/src/components/ui/Button/Button";
import FeaturedEvent from "./FeaturedEvent/FeaturedEvent";
import ContributeDataDrivenPage from "../../ui/ContributeDataDrivenPage/ContributeDataDrivenPage";

type CategoryFilterOption = data.Category;

Expand All @@ -24,8 +25,8 @@ const CaseStudiesPage: React.FC = () => {
<p>
Below is a list of key industry events hosted by Pulsar contributors,
as well as local meetups around the globe.
If you have one to add, learn more about submitting a pull request <a target="_blank" href="https://github.com/apache/pulsar/pulls">here</a>.
</p>
<ContributeDataDrivenPage />
</section>

<div className={s.FeaturedEvent}>
Expand Down
4 changes: 3 additions & 1 deletion src/components/pages/PoweredByPage/PoweredByPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ import * as React from "react";

import Layout from "@theme/Layout";
import Translate from "@docusaurus/Translate";
import users from "../../../../data/users";
import users from "../../../../data/powered-by";

import s from './PoweredByPage.module.css';
import BrowserOnly from "@docusaurus/BrowserOnly";
import ContributeDataDrivenPage from "../../ui/ContributeDataDrivenPage/ContributeDataDrivenPage";

const PoweredByPage = () => {
return (
Expand All @@ -18,6 +19,7 @@ const PoweredByPage = () => {
Companies using or contributing to Apache Pulsar
</Translate>
</h2>
<ContributeDataDrivenPage />
<hr />
</header>

Expand Down
2 changes: 2 additions & 0 deletions src/components/pages/ResourcesPage/ResourcesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Page from "@site/src/components/ui/Page/Page";
import s from './ResourcesPage.module.css';
import Button from "@site/src/components/ui/Button/Button";
import Input from "@site/src/components/ui/Input/Input";
import ContributeDataDrivenPage from "../../ui/ContributeDataDrivenPage/ContributeDataDrivenPage";

const categoryFilterOptions = [...data.categories] as const;

Expand All @@ -25,6 +26,7 @@ const CaseStudiesPage: React.FC = () => {
<p>
Find Apache Pulsar tutorials, how-tos and other technical content by searching with keywords.
</p>
<ContributeDataDrivenPage />
</section>
</div>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.ContributeDataDrivenPage {
background-color: var(--text-color);
border-radius: 0.5rem;
color: #fff;
padding: 0.25rem 1rem;
font-size: 14px;
display: inline-block;
}

.ContributeDataDrivenPage:hover {
color: #fff;
text-decoration: underline;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from 'react';
import s from './ContributeDataDrivenPage.module.css'

const ContributeDataDrivenPage: React.FC = () => {
return (
<a className={s.ContributeDataDrivenPage} href="/contribute/site-intro/#how-to-update-data-driven-pages">
<strong>Are we missing any?</strong> Please contribute updates by clicking here and following the instructions
</a>
);
}

export default ContributeDataDrivenPage;
7 changes: 5 additions & 2 deletions src/pages/team.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import * as React from "react";
import Layout from "@theme/Layout";
import TeamTable from "../components/pages/CommunityPage/TeamTable";
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
import Translate, { translate } from "@docusaurus/Translate";
import ContributeDataDrivenPage from '../components/ui/ContributeDataDrivenPage/ContributeDataDrivenPage';
import team from "../../data/team";

export default function page(props) {
Expand Down Expand Up @@ -35,6 +34,10 @@ export default function page(props) {
</translate>
</p>

<p>
<ContributeDataDrivenPage />
</p>

<h2>
<translate>PMC members</translate>
</h2>
Expand Down
2 changes: 1 addition & 1 deletion src/utils/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import compareVersions from 'compare-versions';

import users from '../../data/users';
import users from '../../data/powered-by';
// const featuredUsers = users.filter((x) => x.hasOwnProperty("featured"));
// featuredUsers.sort((a, b) => (a.featured > b.featured ? 1 : -1));
import versions from '../../versions.json';
Expand Down

0 comments on commit 86c343f

Please sign in to comment.