Skip to content

Commit

Permalink
Merge branch 'master' into feat/table-of-contents
Browse files Browse the repository at this point in the history
  • Loading branch information
derberg authored May 22, 2023
2 parents 8977a3a + 2a27d06 commit 3653f4f
Show file tree
Hide file tree
Showing 16 changed files with 239 additions and 164 deletions.
10 changes: 10 additions & 0 deletions assets/docs/fragments/cli-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@ You can install in Linux via `dpkg`, a debian package manager:
1. `curl -OL https://github.com/asyncapi/cli/releases/latest/download/asyncapi.deb`
2. `sudo dpkg -i asyncapi.deb`

</details>

<details>
<summary>Windows</summary>

For Windows, install the appropriate installer and follow the default installation steps to complete the installation process.

Download [asyncapi.x64.exe](https://github.com/asyncapi/cli/releases/latest/download/asyncapi.x64.exe) for 64-bit Windows and [asyncapi.x86.exe](https://github.com/asyncapi/cli/releases/latest/download/asyncapi.x86.exe) for 32-bit Windows.


</details>

<details>
Expand Down
2 changes: 1 addition & 1 deletion components/TOC.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default function TOC({
//For TOC rendering in specification files in the spec repo we have "a" tags added manually to the spec markdown document
//MDX takes these "a" tags and uses them to render the "id" for headers like a-namedefinitionsapplicationaapplication
//slugWithATag contains transformed heading name that is later used for scroll spy identification
slugWithATag: item.content.replace(/<|>|"|\\|\/|=/gi, '').replace(/\s/gi, '-').toLowerCase()
slugWithATag: item.content.replace(/[<>?!:`'."\\\/=]/gi, '').replace(/\s/gi, '-').toLowerCase()
}));
const [open, setOpen] = useState(false);

Expand Down
71 changes: 28 additions & 43 deletions components/campaigns/AnnoucementHero.js
Original file line number Diff line number Diff line change
@@ -1,35 +1,28 @@
import YouTube from 'react-youtube-embed'
import Paragraph from '../typography/Paragraph'
import Button from '../buttons/Button'
import Heading from '../typography/Heading'
import Container from '../layout/Container'
import AnnouncementRemainingDays from './AnnouncementRamainingDays'

function getConferenceDetails() {
const day = new Date().getUTCDate();
function shouldShowBanner() {
const month = new Date().getUTCMonth();
const year = new Date().getUTCFullYear();

// month=10 is November
if (year > 2022 || month !== 10) {
return;
}

switch (day) {
// 3rd November
case 3: return { day: 1, ytId: 'NTHsezlKBh8' };
// 4th November
case 4: return { day: 2, ytId: '8khuAfL7TSE' };
// 5th November
case 5: return { day: 3, ytId: 'R8PYWXDDZbI' };

//month=4 is May
if (year > 2023 || month !== 4) {
return false;
}
return true;
}

export default function AnnouncementHero({ className = '', small = false, hideVideo = false }) {
return null;
//return null;

const details = getConferenceDetails();
if (!details) return null;
const showBanner = shouldShowBanner();
if (!showBanner) return null;

const { day, ytId } = details;
const cfpDeadline = '2023-05-31T06:00:00Z'

return (
<Container wide as="section" padding='' className='text-center'>
<div
Expand All @@ -42,32 +35,24 @@ export default function AnnouncementHero({ className = '', small = false, hideVi
level="h2"
typeStyle="heading-lg"
>
AsyncAPI Conference 2022 Day {day} is running!
AsyncAPI Conf on Tour 2023
</Heading>
{!hideVideo && (
<div className='px-4 mt-4 mx-auto max-w-5xl'>
<YouTube id={ytId} />
</div>
)}
<div className="mt-8 pb-2 space-x-2">
{hideVideo && (
<Button
href={`https://youtu.be/${ytId}`}
target="_blank"
text="Watch live"
/>
)}
<Button
href="https://asyncapi.slack.com/archives/C047CGM2D2N"
target="_blank"
text="Comment in #conference2022"
className={hideVideo ? 'bg-white border-secondary-500 border box-border text-secondary-500 hover:text-white bg-secondary-100 hover:bg-secondary-500 transition-all duration-500 ease-in-out' : undefined}
/>
<Heading
className="countdown-text-gradient"
level="h3"
typeStyle="heading-sm"
>
Madrid Edition
</Heading>
<Paragraph typeStyle="body-lg">
October, 2023 | Madrid, Spain
</Paragraph>
<AnnouncementRemainingDays dateTime={cfpDeadline} eventName="the end for Call for Speakers." />
<div className="mt-6 pb-2 space-x-2">
<Button
href="https://conference.asyncapi.com/schedule"
href="https://sessionize.com/aacot-madrid/"
target="_blank"
text="Check schedule"
className={!hideVideo ? 'bg-white border-secondary-500 border box-border text-secondary-500 hover:text-white bg-secondary-100 hover:bg-secondary-500 transition-all duration-500 ease-in-out' : undefined}
text="Submit a session"
/>
</div>
</div>
Expand Down
23 changes: 18 additions & 5 deletions components/layout/DocsLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,26 @@ import { SearchButton, DOCS_INDEX_NAME } from '../AlgoliaSearch';
import IconLoupe from '../icons/Loupe';
import { getAllPosts } from '../../lib/api'
import Link from 'next/link'
import editOptions from '../../config/edit-page-config.json'


function generateEditLink(post) {
if (post.slug.includes('/specifications/')) {
return <a target="_blank" rel="noopener noreferrer" href={`https://github.com/asyncapi/spec/blob/master/spec/asyncapi.md`} className="ml-1 underline">Edit this page on GitHub</a>
}
return <a target="_blank" rel="noopener noreferrer" href={`https://github.com/asyncapi/website/blob/master/pages${post.isIndex ? post.slug + '/index' : post.slug}.md`} className="ml-1 underline">Edit this page on GitHub</a>
}
let last=post.id.substring(post.id.lastIndexOf("/") + 1);
const target=editOptions.find(edit=>{ return post.slug.includes(edit.value)});
const editHref = target.href;
const hrefList = editHref.split('/');
const lastListElement = hrefList[hrefList.length - 1].split('.');
const isHrefToFile = lastListElement.length > 1;
const EditPage="Edit this page on GitHub"

if(target.value==""){
return <a target="_blank" rel="noopener noreferrer" href={`${target.href}${post.isIndex ? post.slug + '/index' : post.slug}.md`} className="ml-1 underline">{EditPage}</a>
}
if (isHrefToFile) last=""
return <a target="_blank" rel="noopener noreferrer" href={`${target.href}/${last}`} className="ml-1 underline">{EditPage}</a>


}

export default function DocsLayout({ post, navItems = {}, children }) {
const posts = getAllPosts()
Expand Down
7 changes: 5 additions & 2 deletions config/TSC_MEMBERS.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@
"company": "Postman",
"repos": [
"optimizer",
"bindings"
"bindings",
"glee",
".github"
]
},
{
Expand Down Expand Up @@ -346,7 +348,8 @@
"company": "Postman",
"repos": [
"cli",
"bundler"
"bundler",
"glee"
]
},
{
Expand Down
18 changes: 18 additions & 0 deletions config/edit-page-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[
{
"value": "/tools/generator",
"href": "https://github.com/asyncapi/generator/tree/master/docs"
},
{
"value": "reference/specification/",
"href": "https://github.com/asyncapi/spec/blob/master/spec/asyncapi.md"
},
{
"value":"/tools/cli",
"href":"https://github.com/asyncapi/cli/tree/master/docs"
},
{
"value": "",
"href": "https://github.com/asyncapi/website/blob/master/pages"
}
]
13 changes: 7 additions & 6 deletions config/meetings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@
"url": "https://github.com/asyncapi/community/issues/587",
"date": "2023-02-15T16:00:00.000Z"
},
{
"title": "Community Meeting",
"calLink": "https://www.google.com/calendar/event?eid=cTd2bGZodXU1YnVzY2Ywa2Y4aG5sZGJzYmcgY19xOXRzZWlnbG9tZHNqNm5qdWh2YnB0czExY0Bn",
"url": "https://github.com/asyncapi/community/issues/589",
"date": "2023-02-07T08:00:00.000Z"
},
{
"title": "Spec 3.0 Meeting",
"calLink": "https://www.google.com/calendar/event?eid=M2swdGhkaG9mbmpndGZqNzQ1czY1cmd1YjggY19xOXRzZWlnbG9tZHNqNm5qdWh2YnB0czExY0Bn",
Expand Down Expand Up @@ -138,5 +132,12 @@
"url": "https://github.com/asyncapi/community/issues/699",
"banner": "",
"date": "2023-05-10T16:00:00.000Z"
},
{
"title": "Community Meeting",
"calLink": "https://www.google.com/calendar/event?eid=Nm9qbjFoNGJ1dmppaGM5bTFmdnZzZDFxNzAgY19xOXRzZWlnbG9tZHNqNm5qdWh2YnB0czExY0Bn",
"url": "https://github.com/asyncapi/community/issues/705",
"banner": "https://user-images.githubusercontent.com/40604284/238269236-93dda2ae-732c-4aab-b71e-18d077b987e7.png",
"date": "2023-05-16T16:00:00.000Z"
}
]
24 changes: 12 additions & 12 deletions config/newsroom_videos.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
[
{
"image_url": "https://i.ytimg.com/vi/l9Tp5eMTol4/hqdefault.jpg",
"title": "Community Health in Open-source",
"description": "Community health in open-source refers to the overall well-being of the individuals that contribute to a particular open-source ...",
"videoId": "l9Tp5eMTol4"
},
{
"image_url": "https://i.ytimg.com/vi/4Zo59cOcFUw/hqdefault.jpg",
"title": "Community meeting (May 16th 2023)",
"description": "https://github.com/asyncapi/community/issues/705.",
"videoId": "4Zo59cOcFUw"
},
{
"image_url": "https://i.ytimg.com/vi/7urTb207V-8/hqdefault.jpg",
"title": "Spec 3.0 meeting (May 10th 2023)",
Expand All @@ -16,17 +28,5 @@
"title": "Community meeting (May 2nd 2023)",
"description": "https://github.com/asyncapi/community/issues/688.",
"videoId": "Z8lnRHL-lCM"
},
{
"image_url": "https://i.ytimg.com/vi/WcmH9ySIX9o/hqdefault.jpg",
"title": "Tackling Interoperability Challenges In Open-Source",
"description": "Interoperability refers to the ability of different systems and software applications to communicate and exchange data seamlessly.",
"videoId": "WcmH9ySIX9o"
},
{
"image_url": "https://i.ytimg.com/vi/82xkJmn-bAc/hqdefault.jpg",
"title": "Spec 3.0 meeting (April 26th 2023)",
"description": "https://github.com/asyncapi/community/issues/670.",
"videoId": "82xkJmn-bAc"
}
]
Loading

0 comments on commit 3653f4f

Please sign in to comment.