Skip to content

Commit cd8847c

Browse files
committed
docs: replace duplicated content with reusable fragments
1 parent 44e57e7 commit cd8847c

18 files changed

+163
-260
lines changed

README.md

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Use the following tools to set up the project:
5656
cd website
5757
```
5858

59-
5. Install all website dependencies.
59+
5. Install all website dependencies.
6060

6161
```bash
6262
npm install
@@ -124,7 +124,7 @@ After cloning repository to your local, perform the following steps from the roo
124124

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

135135
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.
136136
137+
## Use shared Markdown fragments
138+
139+
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.
140+
141+
To include a fragment in a Markdown file:
142+
143+
1. Import the fragment at the top of the file (but below the frontmatter) using the following syntax:
144+
145+
```md
146+
import DesiredFragmentName from '@/markdown/fragments/fragmentYouWantToImport.mdx';
147+
```
148+
149+
1. Add the imported fragment to the desired location in the Markdown file using the following syntax:
150+
151+
```md
152+
<DesiredFragmentName />
153+
```
154+
137155
## Lint the code
138156
To lint the code, run the following command:
139157
```
@@ -212,7 +230,7 @@ All AsyncAPI JSON Schema definition files are being served within the `/definiti
212230
This is possible thanks to the following:
213231
214232
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.
215-
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.
233+
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.
216234
Please find a flowchart explaining the flow this edge function should accomplish:
217235
```mermaid
218236
flowchart TD
@@ -221,10 +239,10 @@ This is possible thanks to the following:
221239
req_no_schemas --> Response(Response)
222240
schema-related -->|Yes| req_schemas[Fetch from GitHub]
223241
req_schemas-->req_json{Was requesting a .json file?}
224-
242+
225243
req_json -->|No| Response(Response)
226244
req_json -->|Yes| response_status{Response Status?}
227-
245+
228246
response_status -->|2xx| response_ok[OK]
229247
response_status -->|304| response_cached[Not Modified]
230248
response_status -->|Any other| response_ko
@@ -237,7 +255,7 @@ This is possible thanks to the following:
237255
send_metric_success -- file served from raw GH --> Response(Response)
238256
send_metric_error --the errored response --> Response(Response)
239257
```
240-
258+
241259
242260
## Project structure
243261
Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,10 @@
1-
## How to contribute to AsyncAPI Docs
2-
3-
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. ❤️
4-
5-
To get started as a Docs contributor:
6-
7-
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).
8-
9-
2. Head over to our Docs GH Board [here](https://github.com/orgs/asyncapi/projects/12).
1+
import DocContributionNotes from '@/markdown/fragments/docContributionNotes.mdx';
2+
import TalkToMe from '@/markdown/fragments/talkToMe.mdx';
103

11-
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.
12-
13-
4. If there is no work done in that Docs issue yet, feel free to open a PR and get started!
14-
15-
### Tag me in your AsyncAPI Doc PRs
16-
17-
Do you have a documentation contributor question and you're wondering how to tag me into a GitHub discussion or PR? Never fear!
4+
## How to contribute to AsyncAPI Docs
185

19-
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) 🐙.
6+
Did you know that you can contribute Docs to AsyncAPI as well?
7+
<DocContributionNotes />
208

219
### Talk to me
22-
23-
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.✨
10+
<TalkToMe />

markdown/blog/2023-April-docs-report.md

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ authors:
1313
byline: In April 2023, the AsyncAPI documentation experienced significant growth with 8,889 sessions and 4,575 unique users, including 2,895 new users.
1414
---
1515

16+
import DocContributionNotes from '@/markdown/fragments/docContributionNotes.mdx';
17+
import TalkToMe from '@/markdown/fragments/talkToMe.mdx';
18+
1619
# AsyncAPI Docs Report - April 2023
1720
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.
1821

@@ -23,7 +26,7 @@ We are thrilled to introduce this year's selected technical writing candidates f
2326
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).
2427

2528
### Overview of the LIVE Writing/Editing Interviews
26-
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.
29+
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.
2730

2831
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.
2932

@@ -78,7 +81,7 @@ graph TD
7881
style A fill:#FF6EC7,stroke:#000000,stroke-width:2px;
7982
style B fill:#B5EAD7,stroke:#000000,stroke-width:2px;
8083
style C fill:#DAD0FF,stroke:#000000,stroke-width:2px;
81-
style D fill:#FDD6C1,stroke:#000000,stroke-width:2px;
84+
style D fill:#FDD6C1,stroke:#000000,stroke-width:2px;
8285
style E fill:#C7CEEA,stroke:#000000,stroke-width:2px;
8386
style F fill:#C7CEEA,stroke:#000000,stroke-width:2px;
8487
style BA fill:#C1F9F7,stroke:#000000,stroke-width:2px;
@@ -109,18 +112,8 @@ style DC fill:#E1FEC1,stroke:#000000,stroke-width:2px;
109112
---
110113

111114
## How to contribute to AsyncAPI Docs
112-
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. ❤️
113-
114-
To get started as a Docs contributor:
115-
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).
116-
2. Head over to our Docs GH Board [here](https://github.com/orgs/asyncapi/projects/12).
117-
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.
118-
4. If there is no work done in that Docs issue yet, feel free to open a PR and get started!
119-
120-
### Tag me in your AsyncAPI Doc PRs
121-
Do you have a documentation contributor question and you're wondering how to tag me into a GitHub discussion or PR? Never fear!
122-
123-
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) 🐙.
115+
Did you know that you can contribute Docs to AsyncAPI as well?
116+
<DocContributionNotes />
124117

125118
### Talk to me
126-
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.✨
119+
<TalkToMe />

markdown/blog/2023-Q1-docs-report.md

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,12 @@ authors:
1414
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.
1515
---
1616

17+
import DocContributionNotes from '@/markdown/fragments/docContributionNotes.mdx';
18+
import TalkToMe from '@/markdown/fragments/talkToMe.mdx';
19+
1720
# AsyncAPI Documentation Report - Q1 2023
1821

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

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

4952
```mermaid
50-
graph LR
53+
graph LR
5154
style A fill:#F9D5E5,stroke:#000000,stroke-width:2px;
5255
style B fill:#T3EFB8,stroke:#000000,stroke-width:2px;
5356
style C fill:#DAD0FF,stroke:#000000,stroke-width:2px;
@@ -77,7 +80,7 @@ style N fill:#T3EFB8,stroke:#000000,stroke-width:2px;
7780
A--> N[WasmEdge]
7881
```
7982

80-
[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**.
83+
[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**.
8184

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

8891
### GSoD technical writer applications are open
89-
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.
92+
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.
9093

9194
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.
9295

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

143146
## Contributor growth
144-
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.
147+
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.
145148

146-
We are thrilled to have new contributors working with us to help ensure consistency and clarity across all documentation.
149+
We are thrilled to have new contributors working with us to help ensure consistency and clarity across all documentation.
147150

148151
## Conclusion
149152
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.
150153

151154
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!
152155

153156
```mermaid
154-
graph TD
157+
graph TD
155158
style A fill:#F9D5E5,stroke:#000000,stroke-width:2px;
156159
style B fill:#T3EFB8,stroke:#000000,stroke-width:2px;
157160
style C fill:#DAD0FF,stroke:#000000,stroke-width:2px;
@@ -170,18 +173,8 @@ style G fill:#FF6EC7,stroke:#000000,stroke-width:2px;
170173
---
171174

172175
## How to contribute to AsyncAPI Docs
173-
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. ❤️
174-
175-
To get started as a Docs contributor:
176-
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).
177-
2. Head over to our Docs GH Board [here](https://github.com/orgs/asyncapi/projects/12).
178-
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.
179-
4. If there is no work done in that Docs issue yet, feel free to open a PR and get started!
180-
181-
### Tag me in your AsyncAPI Doc PRs
182-
Do you have a documentation contributor question and you're wondering how to tag me into a GitHub discussion or PR? Never fear!
183-
184-
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) 🐙.
176+
Did you know that you can contribute Docs to AsyncAPI as well?
177+
<DocContributionNotes />
185178

186179
### Talk to me
187-
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.✨
180+
<TalkToMe />

0 commit comments

Comments
 (0)