Skip to content

Commit

Permalink
docs: replace duplicated content with reusable fragments
Browse files Browse the repository at this point in the history
  • Loading branch information
bandantonio committed Oct 3, 2024
1 parent 44e57e7 commit cd8847c
Show file tree
Hide file tree
Showing 18 changed files with 163 additions and 260 deletions.
30 changes: 24 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Use the following tools to set up the project:
cd website
```

5. Install all website dependencies.
5. Install all website dependencies.

```bash
npm install
Expand Down Expand Up @@ -124,7 +124,7 @@ After cloning repository to your local, perform the following steps from the roo

#### Steps:
1. Build the Docker image:
```bash
```bash
docker build -t asyncapi-website .`
```
2. Start the container:
Expand All @@ -134,6 +134,24 @@ After cloning repository to your local, perform the following steps from the roo

Now you're running AsyncAPI website in a development mode. Container is mapped with your local copy of the website. Whenever you make changes to the code, the website will refresh and changes visible in localhost:3000.
## Use shared Markdown fragments
To minimize the duplication of content and make it easier to maintain, there are shared fragments you can use when working with Markdown files. These fragments are stored in the `markdown/fragments` directory.
To include a fragment in a Markdown file:
1. Import the fragment at the top of the file (but below the frontmatter) using the following syntax:
```md
import DesiredFragmentName from '@/markdown/fragments/fragmentYouWantToImport.mdx';
```
1. Add the imported fragment to the desired location in the Markdown file using the following syntax:
```md
<DesiredFragmentName />
```
## Lint the code
To lint the code, run the following command:
```
Expand Down Expand Up @@ -212,7 +230,7 @@ All AsyncAPI JSON Schema definition files are being served within the `/definiti
This is possible thanks to the following:
1. A [Netlify Rewrite rule](https://docs.netlify.com/routing/redirects/rewrites-proxies/) located in the [netlify.toml](netlify.toml) file, which acts as proxy for all requests to the `/definitions/<file>` path, serving the content from GH without having an HTTP redirect.
2. A [Netlify Edge Function](https://docs.netlify.com/netlify-labs/experimental-features/edge-functions/) that modifies the `Content-Type` header of the rewrite response to become `application/schema+json`. This lets tooling, such as [Hyperjump](https://json-schema.hyperjump.io), to fetch the schemas directly from their URL.
2. A [Netlify Edge Function](https://docs.netlify.com/netlify-labs/experimental-features/edge-functions/) that modifies the `Content-Type` header of the rewrite response to become `application/schema+json`. This lets tooling, such as [Hyperjump](https://json-schema.hyperjump.io), to fetch the schemas directly from their URL.
Please find a flowchart explaining the flow this edge function should accomplish:
```mermaid
flowchart TD
Expand All @@ -221,10 +239,10 @@ This is possible thanks to the following:
req_no_schemas --> Response(Response)
schema-related -->|Yes| req_schemas[Fetch from GitHub]
req_schemas-->req_json{Was requesting a .json file?}
req_json -->|No| Response(Response)
req_json -->|Yes| response_status{Response Status?}
response_status -->|2xx| response_ok[OK]
response_status -->|304| response_cached[Not Modified]
response_status -->|Any other| response_ko
Expand All @@ -237,7 +255,7 @@ This is possible thanks to the following:
send_metric_success -- file served from raw GH --> Response(Response)
send_metric_error --the errored response --> Response(Response)
```
## Project structure
Expand Down
25 changes: 6 additions & 19 deletions assets/docs/fragments/how-to-contribute.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@
## How to contribute to AsyncAPI Docs

Did you know that you can contribute Docs to AsyncAPI as well? Code isn't the only way to contribute to OSS; Dev Docs are a **huge** help that benefit the entire OSS ecosystem. At AsyncAPI, we value Doc contributions as much as every other type of contribution. ❤️

To get started as a Docs contributor:

1. Familiarize yourself with our [project's Contribution Guide](https://github.com/asyncapi/community/blob/master/CONTRIBUTING.md) and our [Code of Conduct](https://github.com/asyncapi/.github/blob/master/CODE_OF_CONDUCT.md).

2. Head over to our Docs GH Board [here](https://github.com/orgs/asyncapi/projects/12).
import DocContributionNotes from '@/markdown/fragments/docContributionNotes.mdx';
import TalkToMe from '@/markdown/fragments/talkToMe.mdx';

3. Pick an issue you would like to contribute to and leave a comment introducing yourself. This is also the perfect place to leave any questions you may have on how to get started.

4. If there is no work done in that Docs issue yet, feel free to open a PR and get started!

### Tag me in your AsyncAPI Doc PRs

Do you have a documentation contributor question and you're wondering how to tag me into a GitHub discussion or PR? Never fear!
## How to contribute to AsyncAPI Docs

Tag me in your AsyncAPI Doc PRs or [GitHub Discussions](https://github.com/asyncapi/community/discussions/categories/docs) via my GitHub handle, [`/alequetzalli`](https://github.com/alequetzalli) 🐙.
Did you know that you can contribute Docs to AsyncAPI as well?
<DocContributionNotes />

### Talk to me

I want and need to listen 👂🏽 to all of your perspectives and ideas. Please don't be shy to express to me what you think needs to be documented first or what is missing. 📝 There's a lot of good work ahead, but **you** determine _our content roadmap_ because the OSS community needs should always come first.✨
<TalkToMe />
23 changes: 8 additions & 15 deletions markdown/blog/2023-April-docs-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ authors:
byline: In April 2023, the AsyncAPI documentation experienced significant growth with 8,889 sessions and 4,575 unique users, including 2,895 new users.
---

import DocContributionNotes from '@/markdown/fragments/docContributionNotes.mdx';
import TalkToMe from '@/markdown/fragments/talkToMe.mdx';

# AsyncAPI Docs Report - April 2023
In April 2023, the AsyncAPI documentation experienced significant growth with **8,889 sessions** and **4,575 unique users**, including **2,895 new users**. April was a strong month for our expanding docs community.

Expand All @@ -23,7 +26,7 @@ We are thrilled to introduce this year's selected technical writing candidates f
Alejandra Quetzalli has chosen four outstanding candidates to collaborate with us for GSoD this year: [Mahfuza](https://github.com/mhmohona), [Bhaswati](https://github.com/BhaswatiRoy), [Rohit](https://github.com/TRohit20), and [Hridyesh](https://github.com/kakabisht).

### Overview of the LIVE Writing/Editing Interviews
During the LIVE interview session, Alejandra divided the exercises into two parts: writing and editing. Candidates were given a document and asked to identify issues and potential solutions, then rewrite or edit the document as needed. Some candidates faced challenges with staying focused on writing, while others struggled to generate ideas due to nerves or the live format of the exercise. A few candidates had difficulty spotting errors and completing the editing task.
During the LIVE interview session, Alejandra divided the exercises into two parts: writing and editing. Candidates were given a document and asked to identify issues and potential solutions, then rewrite or edit the document as needed. Some candidates faced challenges with staying focused on writing, while others struggled to generate ideas due to nerves or the live format of the exercise. A few candidates had difficulty spotting errors and completing the editing task.

However, Alejandra did not disqualify candidates who experienced nerves, writer's block, or had limited editing skills. Instead, she guided them with questions and suggestions, encouraging them to search for answers online during the call. The main objective was to evaluate the candidates' problem-solving skills, ability to accept feedback, and integrate suggestions for improvement. The following sections outline the writing and editing exercises and the selection criteria for the candidates.

Expand Down Expand Up @@ -78,7 +81,7 @@ graph TD
style A fill:#FF6EC7,stroke:#000000,stroke-width:2px;
style B fill:#B5EAD7,stroke:#000000,stroke-width:2px;
style C fill:#DAD0FF,stroke:#000000,stroke-width:2px;
style D fill:#FDD6C1,stroke:#000000,stroke-width:2px;
style D fill:#FDD6C1,stroke:#000000,stroke-width:2px;
style E fill:#C7CEEA,stroke:#000000,stroke-width:2px;
style F fill:#C7CEEA,stroke:#000000,stroke-width:2px;
style BA fill:#C1F9F7,stroke:#000000,stroke-width:2px;
Expand Down Expand Up @@ -109,18 +112,8 @@ style DC fill:#E1FEC1,stroke:#000000,stroke-width:2px;
---

## How to contribute to AsyncAPI Docs
Did you know that you can contribute Docs to AsyncAPI as well? Code isn't the only way to contribute to OSS; docs are a **huge** help that benefit the entire OSS ecosystem. At AsyncAPI, we value Doc contributions as much as every other type of contribution. ❤️

To get started as a Docs contributor:
1. Familiarize yourself with our [project's Contribution Guide](https://github.com/asyncapi/community/blob/master/CONTRIBUTING.md) and our [Code of Conduct](https://github.com/asyncapi/.github/blob/master/CODE_OF_CONDUCT.md).
2. Head over to our Docs GH Board [here](https://github.com/orgs/asyncapi/projects/12).
3. Pick an issue you would like to contribute to and leave a comment introducing yourself. This is also the perfect place to leave any questions you may have on how to get started.
4. If there is no work done in that Docs issue yet, feel free to open a PR and get started!

### Tag me in your AsyncAPI Doc PRs
Do you have a documentation contributor question and you're wondering how to tag me into a GitHub discussion or PR? Never fear!

Tag me in your AsyncAPI Doc PRs or [GitHub Discussions](https://github.com/asyncapi/community/discussions/categories/docs) via my GitHub handle, [`/alequetzalli`](https://github.com/alequetzalli) 🐙.
Did you know that you can contribute Docs to AsyncAPI as well?
<DocContributionNotes />

### Talk to me
I want and need to listen 👂🏽 to all of your perspectives and ideas. Please don't be shy to express to me what you think needs to be documented first or what is missing. 📝 There's a lot of good work ahead, but **you** determine _our content roadmap_ because the OSS community needs should always come first.✨
<TalkToMe />
33 changes: 13 additions & 20 deletions markdown/blog/2023-Q1-docs-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ authors:
excerpt: Did you know that you can contribute Docs to AsyncAPI as well? Code isn't the only way to contribute to OSS; Dev Docs are a huge help that benefit the entire OSS ecosystem.
---

import DocContributionNotes from '@/markdown/fragments/docContributionNotes.mdx';
import TalkToMe from '@/markdown/fragments/talkToMe.mdx';

# AsyncAPI Documentation Report - Q1 2023

During Q1 2023, AsyncAPI Docs had **26,875 sessions** and **13,506 unique users**.
During Q1 2023, AsyncAPI Docs had **26,875 sessions** and **13,506 unique users**.

```mermaid
graph TD
Expand Down Expand Up @@ -47,7 +50,7 @@ style G fill:#FBC5C5,stroke:#000000,stroke-width:2px;
## Google Season of Docs 2023 (GSoD)

```mermaid
graph LR
graph LR
style A fill:#F9D5E5,stroke:#000000,stroke-width:2px;
style B fill:#T3EFB8,stroke:#000000,stroke-width:2px;
style C fill:#DAD0FF,stroke:#000000,stroke-width:2px;
Expand Down Expand Up @@ -77,7 +80,7 @@ style N fill:#T3EFB8,stroke:#000000,stroke-width:2px;
A--> N[WasmEdge]
```

[AsyncAPI is one of 13 OSS organizations accepted into Google Season of Docs 2023!](https://developers.google.com/season-of-docs/docs/participants) Selected technical writers will work on two projects: **documenting the AsyncAPI document in detail** and **creating interactive learning paths**.
[AsyncAPI is one of 13 OSS organizations accepted into Google Season of Docs 2023!](https://developers.google.com/season-of-docs/docs/participants) Selected technical writers will work on two projects: **documenting the AsyncAPI document in detail** and **creating interactive learning paths**.

### GSoD 2023 budget at AsyncAPI:
- We received a total budget of $10,350.
Expand All @@ -86,7 +89,7 @@ style N fill:#T3EFB8,stroke:#000000,stroke-width:2px;
- $350 for participant swag+shipping costs

### GSoD technical writer applications are open
Alejandra Quetzalli is currently accepting applications for technical writers who want to participate in GSoD 2023 at AsyncAPI. **The deadline for applications is April 15.** Interested participants must complete this [AsyncAPI GSoD 2023 written application available in a public Google form](https://forms.gle/Lb4ELK78R1WY2z9MA). We have received 18 applications to date.
Alejandra Quetzalli is currently accepting applications for technical writers who want to participate in GSoD 2023 at AsyncAPI. **The deadline for applications is April 15.** Interested participants must complete this [AsyncAPI GSoD 2023 written application available in a public Google form](https://forms.gle/Lb4ELK78R1WY2z9MA). We have received 18 applications to date.

If selected, the next step in the process for candidates will be to receive a direct follow-up message (DM) on AsyncAPI Slack and an email from Alejandra to schedule a LIVE editing and writing exercise interview. Up to 6 technical writers will be selected no later than April 21st.

Expand Down Expand Up @@ -141,17 +144,17 @@ Here are the Spec 3.0 release changes requiring documentation:
- [More reusable objects in components](https://github.com/asyncapi/spec/pull/792)

## Contributor growth
We are pleased to report that **new docs contributors** are already working on the _AsyncAPI Docs Style Guide_, such as [Bhaswati Roy](https://github.com/BhaswatiRoy). Bhaswati impressed us with her research strength and ability to break down new topics into managable tasks.
We are pleased to report that **new docs contributors** are already working on the _AsyncAPI Docs Style Guide_, such as [Bhaswati Roy](https://github.com/BhaswatiRoy). Bhaswati impressed us with her research strength and ability to break down new topics into managable tasks.

We are thrilled to have new contributors working with us to help ensure consistency and clarity across all documentation.
We are thrilled to have new contributors working with us to help ensure consistency and clarity across all documentation.

## Conclusion
Overall, Q1 2023 saw many sessions and unique users visiting the new AsyncAPI Docs after their information architecture makeover from the GSoD 2022 program. For the second time, we were accepted into Google Season of Docs 2023 for two projects that will help improve the quality of our documentation and provide valuable opportunities for contributors to develop new skills. We have also begun planning documentation updates for the upcoming Spec 3.0 release and started work on our first style guide, which will ensure that our documentation remains consistent and relevant.

Creating our first AsyncAPI Docs style guide is a major milestone because it will help ensure consistency and clarity across all documentation moving forward. With three new contributors working on the Style Guide and 18 applications already submitted for GSoD 2023 technical writing positions, the future of our docs community keeps looking bright!

```mermaid
graph TD
graph TD
style A fill:#F9D5E5,stroke:#000000,stroke-width:2px;
style B fill:#T3EFB8,stroke:#000000,stroke-width:2px;
style C fill:#DAD0FF,stroke:#000000,stroke-width:2px;
Expand All @@ -170,18 +173,8 @@ style G fill:#FF6EC7,stroke:#000000,stroke-width:2px;
---

## How to contribute to AsyncAPI Docs
Did you know that you can contribute Docs to AsyncAPI as well? Code isn't the only way to contribute to OSS; Dev Docs are a **huge** help that benefit the entire OSS ecosystem. At AsyncAPI, we value Doc contributions as much as every other type of contribution. ❤️

To get started as a Docs contributor:
1. Familiarize yourself with our [project's Contribution Guide](https://github.com/asyncapi/community/blob/master/CONTRIBUTING.md) and our [Code of Conduct](https://github.com/asyncapi/.github/blob/master/CODE_OF_CONDUCT.md).
2. Head over to our Docs GH Board [here](https://github.com/orgs/asyncapi/projects/12).
3. Pick an issue you would like to contribute to and leave a comment introducing yourself. This is also the perfect place to leave any questions you may have on how to get started.
4. If there is no work done in that Docs issue yet, feel free to open a PR and get started!

### Tag me in your AsyncAPI Doc PRs
Do you have a documentation contributor question and you're wondering how to tag me into a GitHub discussion or PR? Never fear!

Tag me in your AsyncAPI Doc PRs or [GitHub Discussions](https://github.com/asyncapi/community/discussions/categories/docs) via my GitHub handle, [`/alequetzalli`](https://github.com/alequetzalli) 🐙.
Did you know that you can contribute Docs to AsyncAPI as well?
<DocContributionNotes />

### Talk to me
I want and need to listen 👂🏽 to all of your perspectives and ideas. Please don't be shy to express to me what you think needs to be documented first or what is missing. 📝 There's a lot of good work ahead, but **you** determine _our content roadmap_ because the OSS community needs should always come first.✨
<TalkToMe />
Loading

0 comments on commit cd8847c

Please sign in to comment.