Skip to content

Commit

Permalink
docs: add ExternalCodeEmbed component to website contributing
Browse files Browse the repository at this point in the history
  • Loading branch information
wellwelwel committed Jan 6, 2024
1 parent 0bfe719 commit 51425d5
Showing 1 changed file with 39 additions and 1 deletion.
40 changes: 39 additions & 1 deletion website/docs/contributing/website.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ title: Documentation Site
import { FAQ } from '@site/src/components/FAQ';
import { History } from '@site/src/components/History';
import { Stability } from '@site/src/components/Stability';
import { ExternalCodeEmbed } from '@site/src/components/ExternalCodeEmbed';

# Website Contributing Guidelines

Expand Down Expand Up @@ -145,7 +146,8 @@ import { FAQ } from '@site/src/components/FAQ';

- The **FAQ** component can be utilized in any section or page.
- Code blocks are compatible and can be used within the **FAQ** component.
:::

:::

<FAQ title='Example'>
<FAQ title='Title'>
Expand All @@ -157,6 +159,42 @@ import { FAQ } from '@site/src/components/FAQ';

---

### ExternalCodeEmbed

{/* prettier-ignore-start */}
```tsx
import { ExternalCodeEmbed } from '@site/src/components/ExternalCodeEmbed';

<ExternalCodeEmbed
url='https://github.com/sidorares/node-mysql2/blob/75b05f0765c9edd0c0be8f18d85be05618770cca/.prettierrc'
language='json'
/>

<ExternalCodeEmbed
url='https://raw.githubusercontent.com/sidorares/node-mysql2/master/tools/parse-row.js'
language='js'
extractMethod='parseC'
methodType='function'
/>
```
{/* prettier-ignore-end */}

<FAQ title='Example'>
<ExternalCodeEmbed
url='https://raw.githubusercontent.com/sidorares/node-mysql2/master/.prettierrc'
language='json'
/>

<ExternalCodeEmbed
url='https://raw.githubusercontent.com/sidorares/node-mysql2/master/tools/parse-row.js'
language='js'
extractMethod='parseC'
methodType='function'
/>
</FAQ>

---

## Running Tests

```bash
Expand Down

0 comments on commit 51425d5

Please sign in to comment.