Skip to content

Commit c86a5de

Browse files
updated bridge doc page + readme
1 parent 21d9867 commit c86a5de

File tree

3 files changed

+167
-5
lines changed

3 files changed

+167
-5
lines changed

README.md

+111-4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33

44
Bridge is a single, easy-to-navigate hub that beautifully renders all our product documentation from the `/docs` folder of all our GitHub repositories.
55

6+
> [!NOTE]
7+
> Overture Docs started under the name Bridge to reflect its ability to bridge information across multiple repositories. Bridge was also chosen in fitting with Overtures Orchestral theme.>
8+
69
## Documentation Framework
710

811
Overture has three user profiles:
@@ -17,10 +20,10 @@ Our documentation is split up as follows:
1720

1821
| Documentation | User Profile | Description
1922
|---|---|---|
20-
| Developer/Product Documentation | Software Engineers & Developers | Technical resources for those working on or contributing to the project. |
21-
| Platform Guides | IT Specialists & Informaticians | Instructive guides covering platform setup, maintenance and usage for end-users and administrators. |
23+
| Product Documentation (Housed here) | Software Engineers & Developers | Technical resources for those working on or contributing to the project. |
24+
| Platform Guides (Overture.bio) | IT Specialists & Informaticians | Instructive guides covering platform setup, maintenance and usage for end-users and administrators. |
2225

23-
## How OvertureDocs Works
26+
## How Overture Docs Works
2427

2528
- **Docusaurus**: We use Docusaurus to render the site, providing a sleek and navigable interface for our documentation.
2629

@@ -40,6 +43,11 @@ Our documentation is split up as follows:
4043

4144
- **Robust Error Handling**: Docusaurus has excellent error catching, particularly for broken and missing links, reducing the need for manual testing.
4245

46+
![Pro Tip](./website/docs/03-other-software/images/proTip.png 'Use Overture Docs repo to search across all Overture repos')
47+
48+
> [!TIP]
49+
> The Overture Docs repo contains everything, therefore finding & tracking links and content across all our repos has never been easier.
50+
4351
## Getting Started
4452

4553
### Running it Locally
@@ -66,7 +74,7 @@ npm start
6674
6775
### Adding Submodules
6876

69-
Use the following command to add a new submodule:
77+
Use the following command from the submodules directory to add a new submodule:
7078

7179
```bash
7280
git submodule add -b <branchName> <GitHub repository URL> module_name
@@ -123,3 +131,102 @@ plugins: ['./docsPlugin.ts'],
123131
```
124132

125133
The source of this fix can be found [here](https://github.com/facebook/docusaurus/issues/3272#issuecomment-688409489).
134+
135+
## Globally imported Mdx components
136+
137+
We can import components by default across all our mdx files reducing the head matter when using these components in mdx documents. This can be configured from the `/src/theme/MDXComponents.ts`:
138+
139+
```ts title="MDXComponents.ts"
140+
import type {ComponentType} from 'react';
141+
import MDXComponents from '@theme-original/MDXComponents';
142+
import Tabs from '@theme/Tabs';
143+
import TabItem from '@theme/TabItem';
144+
145+
146+
const components: typeof MDXComponents & {
147+
Tabs: ComponentType<any>;
148+
TabItem: ComponentType<any>;
149+
DocCardList: ComponentType<any>;
150+
} = {
151+
...MDXComponents,
152+
Tabs,
153+
TabItem,
154+
DocCardList,
155+
};
156+
157+
export default components;
158+
```
159+
160+
## Custom Components
161+
162+
There are three custom components built for this site all located in the components directory as follows:
163+
164+
```
165+
.
166+
└── /src/
167+
└── components/
168+
├── FundingStatment
169+
├── SiteMap
170+
└── SwaggerAPIDoc
171+
```
172+
173+
### Site Map
174+
175+
### Site Map
176+
177+
- The sitemap component renders the frontpage navigation of the website, organized in a mosaic layout with left and right columns
178+
- Categories can be added by extending the `const categories:` object (lines 24-45) with new entries containing:
179+
- `title`: Category display name
180+
- `description`: Brief category description
181+
- Products are defined in `const products:` array (lines 47-61) with each product requiring:
182+
- `title`: Product name
183+
- `link`: URL path
184+
- `description`: Brief description
185+
- `category`: Must match a category key
186+
- `image`: Optional icon path
187+
188+
The layout groups products into their respective categories and automatically distributes them between the left column (`core`, `development`) and right column (`platform`, `misc`, `standards`).
189+
190+
This component also includes our funding statement, the copy used can be updated directly from the component on line 90.
191+
192+
> [!NOTE] Improvement Consideration
193+
> The current implementation uses hardcoded arrays (leftColumnCategories and rightColumnCategories) for column distribution. This is not ideal however it is the simplest method to organize our site content in its ideal layout.
194+
195+
### Sidebar Funding Statement
196+
197+
A simple React component that displays funding attribution information on the bottom left of all sidebars. It uses CSS Modules for scoped styling (styles.module.css).
198+
199+
> [!NOTE] Improvement Consideration
200+
> Consider making the content configurable by accepting props rather than hardcoding the grant information, allowing reuse for different funding sources.
201+
202+
### Swagger API Embed
203+
204+
The `SwaggerAPIDoc` component renders API documentation completely client-side by:
205+
206+
1. Importing local JSON specification files (`songAPI.json`, `scoreAPI.json`, `maestroAPI.json`)
207+
2. Using these static JSON files to generate the documentation UI, meaning:
208+
- No actual API calls are made
209+
- Documentation works offline
210+
- No backend connectivity required
211+
- Safe for internal/private API documentation
212+
- Specifications can be version controlled alongside the code
213+
214+
Usage example with local JSON:
215+
```jsx
216+
// Your JSON spec file (e.g., songAPI.json)
217+
{
218+
"openapi": "3.0.0",
219+
"info": {
220+
"title": "Song API",
221+
// ... rest of your API specification
222+
}
223+
}
224+
225+
// Component usage remains the same
226+
<SwaggerAPIDoc specName="song" />
227+
```
228+
229+
The `tryItOutEnabled={false}` setting further reinforces this by preventing any attempts to make actual API calls from the documentation interface.
230+
231+
> [!NOTE] Improvement Consideration
232+
> Consider making the content configurable by accepting a path prop rather than having to add the spec to the component itself.

submodules/.github

website/docs/03-other-software/01-Bridge.md

+55
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ const components: typeof MDXComponents & {
159159
export default components;
160160
```
161161

162+
162163
## Custom Components
163164

164165
There are three custom components built for this site all located in the components directory as follows:
@@ -174,8 +175,62 @@ There are three custom components built for this site all located in the compone
174175

175176
### Site Map
176177

178+
- The sitemap component renders the frontpage navigation of the website, organized in a mosaic layout with left and right columns
179+
- Categories can be added by extending the `const categories:` object (lines 24-45) with new entries containing:
180+
- `title`: Category display name
181+
- `description`: Brief category description
182+
- Products are defined in `const products:` array (lines 47-61) with each product requiring:
183+
- `title`: Product name
184+
- `link`: URL path
185+
- `description`: Brief description
186+
- `category`: Must match a category key
187+
- `image`: Optional icon path
188+
189+
The layout groups products into their respective categories and automatically distributes them between the left column (`core`, `development`) and right column (`platform`, `misc`, `standards`).
190+
191+
This component also includes our funding statement, the copy used can be updated directly from the component on line 90.
192+
193+
:::tip Improvement Consideration
194+
The current implementation uses hardcoded arrays (leftColumnCategories and rightColumnCategories) for column distribution. This is not ideal however it is the simplest method to organize our site content in its ideal layout.
195+
:::
196+
177197
### Sidebar Funding Statement
178198

199+
A simple React component that displays funding attribution information on the bottom left of all sidebars. It uses CSS Modules for scoped styling (styles.module.css).
200+
201+
:::tip Improvement Consideration
202+
Consider making the content configurable by accepting props rather than hardcoding the grant information, allowing reuse for different funding sources.
203+
:::
204+
179205
### Swagger API Embed
180206

207+
The `SwaggerAPIDoc` component renders API documentation completely client-side by:
208+
209+
1. Importing local JSON specification files (`songAPI.json`, `scoreAPI.json`, `maestroAPI.json`)
210+
2. Using these static JSON files to generate the documentation UI, meaning:
211+
- No actual API calls are made
212+
- Documentation works offline
213+
- No backend connectivity required
214+
- Safe for internal/private API documentation
215+
- Specifications can be version controlled alongside the code
216+
217+
Usage example with local JSON:
218+
```jsx
219+
// Your JSON spec file (e.g., songAPI.json)
220+
{
221+
"openapi": "3.0.0",
222+
"info": {
223+
"title": "Song API",
224+
// ... rest of your API specification
225+
}
226+
}
227+
228+
// Component usage remains the same
229+
<SwaggerAPIDoc specName="song" />
230+
```
231+
232+
The `tryItOutEnabled={false}` setting further reinforces this by preventing any attempts to make actual API calls from the documentation interface.
181233

234+
:::tip Improvement Consideration
235+
Consider making the content configurable by accepting a path prop rather than having to add the spec to the component itself.
236+
:::

0 commit comments

Comments
 (0)