Skip to content

Commit

Permalink
Merge branch 'master' into issue3522
Browse files Browse the repository at this point in the history
  • Loading branch information
SahilDahekar authored Feb 8, 2025
2 parents 1ac4161 + cf8a959 commit 549cce1
Show file tree
Hide file tree
Showing 74 changed files with 2,046 additions and 752 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/check-edit-links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Weekly Docs Link Checker

on:
schedule:
- cron: '0 0 * * 0' # Runs every week at midnight on Sunday
workflow_dispatch:

jobs:
check-links:
name: Run Link Checker and Notify Slack
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'

- name: Install dependencies
run: npm install

- name: Run link checker
id: linkcheck
run: |
npm run test:editlinks | tee output.log
- name: Extract 404 URLs from output
id: extract-404
run: |
ERRORS=$(sed -n '/URLs returning 404:/,$p' output.log)
echo "errors<<EOF" >> $GITHUB_OUTPUT
echo "$ERRORS" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Notify Slack
if: ${{ steps.extract-404.outputs.errors != '' }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.WEBSITE_SLACK_WEBHOOK }}
SLACK_TITLE: 'Docs Edit Link Checker Errors Report'
SLACK_MESSAGE: |
🚨 The following URLs returned 404 during the link check:
```
${{ steps.extract-404.outputs.errors }}
```
MSG_MINIMAL: true
2 changes: 1 addition & 1 deletion components/MDX/MDX.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import Row from '../layout/Row';
import NewsletterSubscribe from '../NewsletterSubscribe';
import Profiles from '../Profiles';
import Remember from '../Remember';
import Sponsors from '../sponsors/Sponsors';
import Sponsors from '../sponsors/PlatinumSponsors';
import Warning from '../Warning';
import { Table, TableBody, TableCell, TableHeader, TableRow, Thead } from './MDXTable';

Expand Down
6 changes: 3 additions & 3 deletions components/TOC.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default function TOC({ className, cssBreakingPoint = 'xl', toc, contentSe
// a-namedefinitionsapplicationaapplication slugWithATag contains transformed heading name that is later used
// for scroll spy identification
slugWithATag: item.content
.replace(/[<>?!:`'."\\/=]/gi, '')
.replace(/[<>?!:`'."\\/=@#$%^&*()[\]{}+,;]/gi, '')
.replace(/\s/gi, '-')
.toLowerCase()
}));
Expand Down Expand Up @@ -75,7 +75,7 @@ export default function TOC({ className, cssBreakingPoint = 'xl', toc, contentSe
</div>
<div className={`${!open && 'hidden'} ${cssBreakingPoint === 'xl' ? 'xl:block' : 'lg:block'}`}>
<Scrollspy
items={tocItems.map((item) => item.slug)}
items={tocItems.map((item) => (item.slug ? item.slug : item.slugWithATag))}
currentClassName='text-primary-500 font-bold'
componentTag='div'
rootEl={contentSelector}
Expand All @@ -85,7 +85,7 @@ export default function TOC({ className, cssBreakingPoint = 'xl', toc, contentSe
<a
className={`pl-${2 ** (item.lvl - 1)} font-normal mb-1 block font-sans text-sm
text-gray-900 antialiased transition duration-100 ease-in-out hover:underline`}
href={`#${item.slug}`}
href={`#${item.slug ? item.slug : item.slugWithATag}`}
key={index}
data-testid='TOC-Link'
>
Expand Down
5 changes: 4 additions & 1 deletion components/buttons/ScrollButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ function ScrollButton() {
return (
<div className='fixed bottom-14 right-4 z-40 h-16 w-12'>
{backToTopButton && (
<button className='rounded-full bg-white shadow-md ' onClick={scrollUp}>
<button
className='rounded-full bg-white shadow-md transition-all duration-300 ease-in-out hover:scale-110 hover:bg-[#8851FB]'
onClick={scrollUp}
>
<img src={scrollImage} alt='scroll to top' />
</button>
)}
Expand Down
37 changes: 22 additions & 15 deletions components/campaigns/AnnouncementHero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,21 +62,28 @@ export default function AnnouncementHero({ className = '', small = false }: IAnn
)}
<div className='relative flex w-5/6 flex-col items-center justify-center gap-2'>
<div className='relative flex min-h-72 w-full items-center justify-center overflow-hidden lg:h-[17rem] lg:w-[38rem]'>
{visibleBanners.map((banner, index) => (
<Banner
key={index}
title={banner.title}
dateLocation={banner.dateLocation}
cfaText={banner.cfaText}
eventName={banner.eventName}
cfpDeadline={banner.cfpDeadline}
link={banner.link}
city={banner.city}
activeBanner={index === activeIndex % numberOfVisibleBanners}
className={className}
small={small}
/>
))}
{visibleBanners.map((banner, index) => {
// Only render active banner and immediate neighbors
const isVisible = Math.abs(index - (activeIndex % numberOfVisibleBanners)) <= 1;

if (!isVisible) return null;

return (
<Banner
key={index}
title={banner.title}
dateLocation={banner.dateLocation}
cfaText={banner.cfaText}
eventName={banner.eventName}
cfpDeadline={banner.cfpDeadline}
link={banner.link}
city={banner.city}
activeBanner={index === activeIndex % numberOfVisibleBanners}
className={className}
small={small}
/>
);
})}
</div>
<div className='m-auto flex justify-center'>
{visibleBanners.map((banner, index) => (
Expand Down
12 changes: 6 additions & 6 deletions components/campaigns/banners.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ export function shouldShowBanner(cfpDeadline: string) {
export const banners = [
{
title: 'AsyncAPI Conference',
city: 'Paris Edition',
dateLocation: '5th of December, 2024 | France, Paris',
cfaText: 'Get Your Free Ticket',
eventName: 'the AsyncAPI Conf in Paris',
cfpDeadline: '2024-12-01T06:00:00Z',
link: 'https://conference.asyncapi.com/#tickets'
city: 'Singapore Edition',
dateLocation: '15th - 16th of April, 2025 | Marina Bay, Singapore',
cfaText: 'Apply To Speak',
eventName: 'the end of Call for Speakers',
cfpDeadline: '2025-02-24T06:00:00Z',
link: 'https://apidays.typeform.com/apidayscfp?typeform-source=www.apidays.global'
}
];
4 changes: 0 additions & 4 deletions components/footer/FooterList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ export const initiativeLinks: InitiativeLink[] = [
label: 'Blog',
url: '/blog'
},
{
label: 'Shop',
url: 'https://www.store.asyncapi.com/'
},
{
label: 'Brand',
url: 'https://github.com/asyncapi/brand/blob/master/brand-guidelines/README.md'
Expand Down
4 changes: 4 additions & 0 deletions components/layout/DocsLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ interface IDocsLayoutProps {
*/
function generateEditLink(post: IPost) {
let last = post.id.substring(post.id.lastIndexOf('/') + 1);

if (last.endsWith('.mdx')) {
last = last.replace('.mdx', '.md');
}
const target = editOptions.find((edit) => {
return post.slug.includes(edit.value);
});
Expand Down
3 changes: 3 additions & 0 deletions components/navigation/Filter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ export default function Filter({ data, onFilter, checks, className }: FilterProp

if (e) {
newQuery[check.name] = e;
} else {
// Remove a specific filter upon clicking Select Placeholder option
delete newQuery[check.name];
}
if (newQuery) {
const queryParams = new URLSearchParams(newQuery as { [key: string]: string }).toString();
Expand Down
5 changes: 3 additions & 2 deletions components/sponsors/GoldSponsors.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';

import { goldSponsors } from './GoldSponsorsList';
import SponsorImage from './SponsorImage';

interface GoldSponsorsProps {
className?: string;
Expand All @@ -26,10 +27,10 @@ export default function GoldSponsors({ className = '' }: GoldSponsorsProps): Rea
rel='noopener noreferrer'
data-testid='GoldSponsors-link'
>
<img
className={sponsor.imageClass}
<SponsorImage
src={sponsor.imageSrc}
alt={sponsor.altText}
className={sponsor.imageClass}
data-testid='GoldSponsors-img'
/>
</a>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';

import { sponsors } from './SponsorsList';
import { platinumSponsors } from './PlatinumSponsorsList';
import SponsorImage from './SponsorImage';

interface SponsorsProps {
className: string;
Expand All @@ -13,11 +14,11 @@ interface SponsorsProps {
* @param {string} props.className - Additional CSS classes for styling.
* @param {boolean} props.showSupportBanner - Indicates whether support banner should be displayed.
*/
export default function Sponsors({ className = '', showSupportBanner = true }: SponsorsProps): React.ReactNode {
export default function PlatinumSponsors({ className = '', showSupportBanner = true }: SponsorsProps): React.ReactNode {
return (
<div className={`text-center ${className}`}>
<ul className='mb-4 flex flex-wrap items-center justify-center md:px-4'>
{sponsors.map((sponsor, index) => (
{platinumSponsors.map((sponsor, index) => (
<li key={index} className='w-2/3 sm:w-1/4 md:w-1/3 lg:w-1/5' data-testid='Sponsors-list'>
<a
href={sponsor.website}
Expand All @@ -26,7 +27,7 @@ export default function Sponsors({ className = '', showSupportBanner = true }: S
rel='noopener noreferrer'
data-testid='Sponsors-link'
>
<img
<SponsorImage
className={sponsor?.imageClass}
src={sponsor.imageSrc}
alt={sponsor.altText}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { SponsorType } from '@/types/components/sponsors/SponsorType';

export const sponsors: SponsorType[] = [
export const platinumSponsors: SponsorType[] = [
{
name: 'Solace',
website: 'https://www.solace.com',
Expand Down
5 changes: 3 additions & 2 deletions components/sponsors/SilverSponsors.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';

import { Silversponsors } from './SilverSponsorsList';
import SponsorImage from './SponsorImage';

interface SilverSponsorsProps {
className: string;
Expand All @@ -26,10 +27,10 @@ export default function SilverSponsors({ className = '' }: SilverSponsorsProps):
rel='noopener noreferrer'
data-testid='SilverSponsors-link'
>
<img
className={sponsor.imageClass}
<SponsorImage
src={sponsor.imageSrc}
alt={sponsor.altText}
className={sponsor.imageClass}
data-testid='SilverSponsors-img'
/>
</a>
Expand Down
19 changes: 19 additions & 0 deletions components/sponsors/SponsorImage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React from 'react';
import { twMerge } from 'tailwind-merge';

interface SponsorImageProps {
src: string;
alt?: string;
className?: string;
}

/**
* A component that displays sponsor logos with consistent dimensions
*/
export default function SponsorImage({ src, alt = 'Sponsor logo', className }: SponsorImageProps) {
return (
<div className='flex size-full items-center justify-center'>
<img src={src} alt={alt} className={twMerge('max-h-9 sm:max-h-12 w-auto object-contain', className)} />
</div>
);
}
98 changes: 0 additions & 98 deletions config/AMBASSADORS_MEMBERS.json
Original file line number Diff line number Diff line change
Expand Up @@ -416,104 +416,6 @@
}
]
},
{
"name": "Mete Atamel",
"github": "meteatamel",
"twitter": "meteatamel",
"country": "🇬🇧",
"bio": "Mete is a Software Engineer and a Developer Advocate with 18+ years of experience. Currently, he works in the Developer Relations team at Google in London. He builds tools, demos, tutorials, and gives talks to educate and help developers to be successful on Google Cloud. As a regular speaker at tech conferences, he has spoken over 345+ events since 2016 on modern application development topics such as Kubernetes, Istio, Knative, serverless, event-driven architectures, and microservice orchestration. Prior to his current role, he was a Software Engineer/Architect/Tech Lead at Nokia, EMC, Adobe, Skype, and Microsoft building various client and server technologies, resulting in multiple patents.",
"linkedin": "mete-atamel",
"company": "Google",
"title": "Software Engineer and Developer Advocate at Google",
"img": "https://avatars.githubusercontent.com/u/1177542?v=4",
"contributions": [
{
"type": "article",
"title": "AsyncAPI Basics",
"date": {
"year": 2023,
"month": "May"
},
"link": "https://medium.com/google-cloud/asyncapi-basics-6e6394c9587"
},
{
"type": "article",
"title": "AsyncAPI Tools",
"date": {
"year": 2023,
"month": "May"
},
"link": "https://medium.com/google-cloud/asyncapi-tools-dd59f9236b20"
},
{
"type": "article",
"title": "Understanding AsyncAPI’s publish & subscribe semantics with an example",
"date": {
"year": 2023,
"month": "May"
},
"link": "https://medium.com/google-cloud/understanding-asyncapis-publish-subscribe-semantics-with-an-example-cfa1cc3faef5"
},
{
"type": "article",
"title": "CloudEvents + AsyncAPI",
"date": {
"year": 2023,
"month": "May"
},
"link": "https://medium.com/google-cloud/cloudevents-asyncapi-fa8ef63f28e0"
},
{
"type": "article",
"title": "Google Cloud Pub/Sub + AsyncAPI",
"date": {
"year": 2023,
"month": "May"
},
"link": "https://medium.com/google-cloud/google-cloud-pub-sub-asyncapi-6ea3c1ed3c49"
},
{
"type": "presentation",
"title": "Open standards for building event-driven applications in the cloud",
"date": {
"year": 2023,
"month": "June"
},
"link": "https://www.youtube.com/watch?v=6Igp4DhK_hE"
}
]
},
{
"name": "Raphael De Lio",
"github": "raphaeldelio",
"twitter": "raphaeldelio",
"linkedin": "raphaeldelio",
"country": "🇧🇷",
"bio": "Raphael De Lio is a passionate software engineer who loves to think about solutions and ways to improve anything he touches. He was born in Brazil, lived in Portugal for five years, and now works as a consultant in the Netherlands. In his quest for knowledge, Raphael has always valued learning and sharing insights with others. This pursuit not only led him to Xebia, a place where he found a community of engineers who share his enthusiasm for technology and continuous improvement but also to becoming the co-organizer of the Amsterdam Kotlin MeetUp, where he has been able to enable other speakers to share their knowledge as well.",
"company": "Xebia",
"title": "Software Consultant at Xebia",
"img": "https://avatars.githubusercontent.com/u/25641721?v=4",
"contributions": [
{
"type": "article",
"title": "AsyncAPI — A standard specification for documenting Event-Driven Applications",
"date": {
"year": 2024,
"month": "February"
},
"link": "https://medium.com/@raphaeldelio/asyncapi-a-standard-for-documenting-event-driven-applications-8ff657119036"
},
{
"type": "presentation",
"title": "AsyncAPI & Springwolf - Automated documentation (and more)",
"date": {
"year": 2024,
"month": "May"
},
"link": "https://www.youtube.com/watch?v=DylvTW_ia4Y"
}
]
},
{
"name": "Hari Krishnan",
"github": "harikrishnan83",
Expand Down
Loading

0 comments on commit 549cce1

Please sign in to comment.