Skip to content

Commit

Permalink
Merge branch 'master' into fix/scroll-to-top
Browse files Browse the repository at this point in the history
  • Loading branch information
Shurtu-gal authored May 24, 2023
2 parents 08384e9 + e7d46c1 commit 56dc859
Show file tree
Hide file tree
Showing 32 changed files with 772 additions and 1,297 deletions.
30 changes: 29 additions & 1 deletion .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -427,9 +427,37 @@
"contributions": [
"code"
]
},
{
"login": "rukundob451",
"name": "Benjamin Rukundo",
"avatar_url": "https://avatars.githubusercontent.com/u/67878128?v=4",
"profile": "https://linkfree.eddiehub.io/rukundob451",
"contributions": [
"code"
]
},
{
"login": "tthijm",
"name": "tthijm",
"avatar_url": "https://avatars.githubusercontent.com/u/59415467?v=4",
"profile": "https://github.com/tthijm",
"contributions": [
"infra"
]
},
{
"login": "CynthiaPeter",
"name": "Cynthia Peter",
"avatar_url": "https://avatars.githubusercontent.com/u/33583060?v=4",
"profile": "http://cynthiapeter.com",
"contributions": [
"doc"
]
}
],
"contributorsPerLine": 7,
"skipCi": false,
"commitConvention": "angular"
"commitConvention": "angular",
"commitType": "docs"
}
58 changes: 58 additions & 0 deletions .github/workflows/validate-case-studies-structures.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Validate case studies structures

on:
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
paths:
- 'config/casestudies/*.yml'

jobs:
validate:
if: github.event.pull_request.draft == false
name: Validate
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v35
with:
files: config/casestudies/*.yml
- name: Install ajv and yaml
run: npm install [email protected] [email protected] [email protected]
- name: Run validation script
uses: actions/github-script@v6
with:
script: |
const { readFile } = require("fs/promises");
const Ajv = require("ajv");
const addFormats = require("ajv-formats");
const YAML = require("yaml");
const ajv = new Ajv({
allErrors: true,
});
addFormats(ajv);
try {
const schema = await readFile("scripts/casestudies/schema.json", "utf-8");
const fileNames = `${{steps.changed-files.outputs.all_changed_files}}`.trim().split(" ");
const validate = ajv.compile(JSON.parse(schema));
for (const fileName of fileNames) {
const study = await readFile(fileName, "utf-8");
const valid = validate(YAML.parse(study));
if (valid === true) {
core.info(`${fileName} is valid`);
} else {
core.setFailed(`${fileName} is invalid:`);
core.setFailed(validate.errors);
}
}
} catch (error) {
core.setFailed(error);
}
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
---

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-42-orange.svg?style=flat-square)](#contributors-)
[![All Contributors](https://img.shields.io/badge/all_contributors-45-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

[![Netlify Status](https://api.netlify.com/api/v1/badges/b2137407-b765-46c4-95b5-a72d9b1592ab/deploy-status)](https://app.netlify.com/sites/asyncapi-website/deploys)
Expand Down Expand Up @@ -203,6 +203,11 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center" valign="top" width="14.28%"><a href="https://www.blessingolaleye.xyz/"><img src="https://avatars.githubusercontent.com/u/70102539?v=4?s=100" width="100px;" alt="Olaleye Blessing"/><br /><sub><b>Olaleye Blessing</b></sub></a><br /><a href="https://github.com/asyncapi/website/commits?author=Olaleye-Blessing" title="Code">💻</a> <a href="#a11y-Olaleye-Blessing" title="Accessibility">️️️️♿️</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/niranjan-kurhade"><img src="https://avatars.githubusercontent.com/u/97905637?v=4?s=100" width="100px;" alt="niranjan-kurhade"/><br /><sub><b>niranjan-kurhade</b></sub></a><br /><a href="https://github.com/asyncapi/website/commits?author=niranjan-kurhade" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://linkfree.eddiehub.io/rukundob451"><img src="https://avatars.githubusercontent.com/u/67878128?v=4?s=100" width="100px;" alt="Benjamin Rukundo"/><br /><sub><b>Benjamin Rukundo</b></sub></a><br /><a href="https://github.com/asyncapi/website/commits?author=rukundob451" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/tthijm"><img src="https://avatars.githubusercontent.com/u/59415467?v=4?s=100" width="100px;" alt="tthijm"/><br /><sub><b>tthijm</b></sub></a><br /><a href="#infra-tthijm" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://cynthiapeter.com"><img src="https://avatars.githubusercontent.com/u/33583060?v=4?s=100" width="100px;" alt="Cynthia Peter"/><br /><sub><b>Cynthia Peter</b></sub></a><br /><a href="https://github.com/asyncapi/website/commits?author=CynthiaPeter" title="Documentation">📖</a></td>
</tr>
</tbody>
</table>

Expand Down
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
17 changes: 15 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 @@ -292,6 +294,16 @@
"jasyncapi"
]
},
{
"name": "Philip Schlesinger",
"github": "theschles",
"slack": "U054UUYBNLF",
"twitter": "philschlesinger",
"availableForHire": false,
"repos": [
"jasyncapi-idea-plugin"
]
},
{
"name": "Pratik Haldankar",
"github": "pratik2315",
Expand Down Expand Up @@ -346,7 +358,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"
}
]
32 changes: 14 additions & 18 deletions config/meetings.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,10 @@
[
{
"title": "Spec 3.0 Meeting",
"calLink": "https://www.google.com/calendar/event?eid=dmVxczhpNjQzdm5tYWFoYnVtZHY1NW9vMWcgY19xOXRzZWlnbG9tZHNqNm5qdWh2YnB0czExY0Bn",
"url": "https://github.com/asyncapi/community/issues/575",
"date": "2023-02-01T16:00:00.000Z"
},
{
"title": "Design meeting",
"calLink": "https://www.google.com/calendar/event?eid=bmRoazVvYjFqbnFoaGI2Y2N1N2liMGNvMWsgY19xOXRzZWlnbG9tZHNqNm5qdWh2YnB0czExY0Bn",
"url": "https://github.com/asyncapi/community/issues/580",
"date": "2023-01-31T15:00:00.000Z"
},
{
"title": "Spec 3.0 Meeting",
"calLink": "https://www.google.com/calendar/event?eid=ZzIwZHNiczh1dnNqdTVkc212Y3I3YmZrcGcgY19xOXRzZWlnbG9tZHNqNm5qdWh2YnB0czExY0Bn",
"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 @@ -150,5 +132,19 @@
"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"
},
{
"title": "Spec 3.0 Meeting",
"calLink": "https://www.google.com/calendar/event?eid=a3JnNnJibDAzNW9ja3ZnMXZ0OGJtcjBqMWMgY19xOXRzZWlnbG9tZHNqNm5qdWh2YnB0czExY0Bn",
"url": "https://github.com/asyncapi/community/issues/714",
"banner": "",
"date": "2023-05-24T16:00:00.000Z"
}
]
Loading

0 comments on commit 56dc859

Please sign in to comment.