Skip to content

Commit

Permalink
[misc] Multiple improvements on Learn page (#634)
Browse files Browse the repository at this point in the history
* [feat] list all posts in the sidebar

Signed-off-by: tison <[email protected]>

* [cleanup] books now has their own page

Signed-off-by: tison <[email protected]>

* [cleanup] tidy resources data

Signed-off-by: tison <[email protected]>

* [refactor] Remove All from Resources to align with Events

Signed-off-by: tison <[email protected]>

---------

Signed-off-by: tison <[email protected]>
  • Loading branch information
tisonkun authored Jul 10, 2023
1 parent d6156c5 commit 81e912f
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 89 deletions.
149 changes: 66 additions & 83 deletions data/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,82 +167,8 @@ export const resources: Record<Category, Resource[]> = {

],

/******************************
* Presentations
*
******************************/
presentations: [
{
forum: 'P99Conf',
forum_link: 'https://www.p99conf.io/',
presenter: 'Karthik Ramasamy',
date: 'Oct 2021',
title: "Scaling Apache Pulsar to 10 PB/day",
link: 'https://www.youtube.com/watch?v=x76sX4BU2mA'
},
{
forum: 'Apache Pulsar Summit',
forum_link: 'https://pulsar-summit.org/',
presenter: 'Many',
date: 'Oct 2021',
title: "Apache Pulsar Summit Europe 2021 Playlist",
link: 'https://www.youtube.com/playlist?list=PLqRma1oIkcWh7zes7mNeTUCr2iU-2C1jB'
},

{
forum: 'ApacheCon @Home 2021',
forum_link: 'https://www.apachecon.com/acah2021/',
presenter: 'Many',
date: 'Sept 2021',
title: "Apache Pulsar Playlist",
link: 'https://www.youtube.com/watch?v=igwxegspSGw&list=PLIt9PL1-3shvC0dGjaPyd0Rqfg1_PZLvS'
},
{
forum: 'Apache Pulsar Neighborhood YouTube',
forum_link: 'https://www.youtube.com/apachepulsarneighborhood',
presenter: 'Enrico Olivelli',
date: 'Sept 2021',
title: "Apache Pulsar Deep Dive- an End-to-end view of the Data Flow",
link: 'https://www.youtube.com/watch?v=oLXCCCGsrWM'
},
{
forum: 'Apache Pulsar Neighborhood YouTube',
forum_link: 'https://www.youtube.com/apachepulsarneighborhood',
presenter: 'Simba Khadder',
date: 'Sept 2021',
title: "Apache Pulsar and Machine Learning",
link: 'https://youtu.be/K2WXDwo1y0k'
},
{
forum: 'Apache Pulsar Neighborhood YouTube',
forum_link: 'https://www.youtube.com/apachepulsarneighborhood',
presenter: 'Enrico Olivelli',
date: 'Sept 2021',
title: "Leveraging Pulsar's Next Gen Streaming Capabilities from a JavaEE Application",
link: 'https://www.youtube.com/watch?v=0NA0BIvkQrs'
},
{
forum: 'Devin Bost\'s YouTube',
forum_link: 'https://www.youtube.com/channel/UCz_Y86AT4G15xU3IojhX2Kw',
presenter: 'Devin Bost',
date: 'Aug 2021',
title: "Streaming Patterns and Best Practices with Apache Pulsar for Enabling Machine Learning and Analytics",
link: 'https://www.youtube.com/watch?v=Fdqre_hTnUI'
},

{
forum: 'Pulsar Summit NA 2021',
forum_link: 'https://pulsar-summit.org/',
presenter: '',
date: 'June 2021',
title: "Pulsar Summit NA 2021 Playlist",
link: 'https://www.youtube.com/watch?v=-Bm1h508oIQ&list=PLqRma1oIkcWjyezVodJHcp8GSypvGuc1C'
}
],
/***************************
* Older Articles
*
*
* *************************/
older_articles: [
{
Expand Down Expand Up @@ -630,21 +556,78 @@ export const resources: Record<Category, Resource[]> = {
link: 'https://debezium.io/blog/2019/05/23/tutorial-using-debezium-connectors-with-apache-pulsar/',
tags: ''
},
{
forum: 'Pulsar in Action',
forum_link: 'https://www.manning.com/books/pulsar-in-action',
title: "Pulsar in Action",
link: 'https://www.manning.com/books/pulsar-in-action',
tags: ''
}

],

/******************************
* Presentations
*
******************************/
presentations: [
{
forum: 'P99Conf',
forum_link: 'https://www.p99conf.io/',
presenter: 'Karthik Ramasamy',
date: 'Oct 2021',
title: "Scaling Apache Pulsar to 10 PB/day",
link: 'https://www.youtube.com/watch?v=x76sX4BU2mA'
},
{
forum: 'Apache Pulsar Summit',
forum_link: 'https://pulsar-summit.org/',
presenter: 'Many',
date: 'Oct 2021',
title: "Apache Pulsar Summit Europe 2021 Playlist",
link: 'https://www.youtube.com/playlist?list=PLqRma1oIkcWh7zes7mNeTUCr2iU-2C1jB'
},

{
forum: 'ApacheCon @Home 2021',
forum_link: 'https://www.apachecon.com/acah2021/',
presenter: 'Many',
date: 'Sept 2021',
title: "Apache Pulsar Playlist",
link: 'https://www.youtube.com/watch?v=igwxegspSGw&list=PLIt9PL1-3shvC0dGjaPyd0Rqfg1_PZLvS'
},
{
forum: 'Apache Pulsar Neighborhood YouTube',
forum_link: 'https://www.youtube.com/apachepulsarneighborhood',
presenter: 'Enrico Olivelli',
date: 'Sept 2021',
title: "Apache Pulsar Deep Dive- an End-to-end view of the Data Flow",
link: 'https://www.youtube.com/watch?v=oLXCCCGsrWM'
},
{
forum: 'Apache Pulsar Neighborhood YouTube',
forum_link: 'https://www.youtube.com/apachepulsarneighborhood',
presenter: 'Simba Khadder',
date: 'Sept 2021',
title: "Apache Pulsar and Machine Learning",
link: 'https://youtu.be/K2WXDwo1y0k'
},
{
forum: 'Apache Pulsar Neighborhood YouTube',
forum_link: 'https://www.youtube.com/apachepulsarneighborhood',
presenter: 'Enrico Olivelli',
date: 'Sept 2021',
title: "Leveraging Pulsar's Next Gen Streaming Capabilities from a JavaEE Application",
link: 'https://www.youtube.com/watch?v=0NA0BIvkQrs'
},
{
forum: 'Devin Bost\'s YouTube',
forum_link: 'https://www.youtube.com/channel/UCz_Y86AT4G15xU3IojhX2Kw',
presenter: 'Devin Bost',
date: 'Aug 2021',
title: "Streaming Patterns and Best Practices with Apache Pulsar for Enabling Machine Learning and Analytics",
link: 'https://www.youtube.com/watch?v=Fdqre_hTnUI'
},

{
forum: 'Pulsar Summit NA 2021',
forum_link: 'https://pulsar-summit.org/',
presenter: '',
date: 'June 2021',
title: "Pulsar Summit NA 2021 Playlist",
link: 'https://www.youtube.com/watch?v=-Bm1h508oIQ&list=PLqRma1oIkcWjyezVodJHcp8GSypvGuc1C'
},
{
forum: 'Apache Pulsar Neighborhood YouTube',
forum_link: 'https://www.youtube.com/apachepulsarneighborhood',
Expand Down
2 changes: 2 additions & 0 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,8 @@ module.exports = {
onlyIncludeVersions: buildVersions || ["current"],
},
blog: {
blogSidebarTitle: 'All posts',
blogSidebarCount: 'ALL',
showReadingTime: true,
editUrl: `${githubSiteUrl}/edit/main/`,
},
Expand Down
8 changes: 3 additions & 5 deletions src/components/pages/ResourcesPage/ResourcesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ import s from './ResourcesPage.module.css';
import Button from "@site/src/components/ui/Button/Button";
import Input from "@site/src/components/ui/Input/Input";

type CategoryFilterOption = 'any' | data.Category;
const categoryFilterOptions = ['any', ...data.categories] as const;
const categoryFilterOptions = [...data.categories] as const;

const CaseStudiesPage: React.FC = () => {
const [searchQuery, setSearchQuery] = useState('');
const [categoryFilter, setCategoryFilter] = React.useState<CategoryFilterOption>('any');
const [categoryFilter, setCategoryFilter] = React.useState<data.Category>(data.categories[0]);

return (
<Layout
Expand All @@ -39,7 +38,7 @@ const CaseStudiesPage: React.FC = () => {
key={category}
variant={categoryFilter === category ? 'action' : 'regular'}
onClick={() => setCategoryFilter(category)}
title={category === 'any' ? 'All' : data.categoryLabels[category]}
title={data.categoryLabels[category]}
/>
);
})}
Expand All @@ -50,7 +49,6 @@ const CaseStudiesPage: React.FC = () => {
</div>

<div>
{categoryFilter === 'any' && <Cards search={searchQuery} resources={Object.values(data.resources).flat()} />}
{data.categories.map((category) => {
if (categoryFilter === category) {
return <Cards key={category} search={searchQuery} resources={data.resources[category]} />
Expand Down
1 change: 0 additions & 1 deletion src/pages/resources.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
import ResourcesPage from '@site/src/components/pages/ResourcesPage/ResourcesPage';

export default ResourcesPage;

0 comments on commit 81e912f

Please sign in to comment.