Skip to content

Commit

Permalink
snippet templates example
Browse files Browse the repository at this point in the history
  • Loading branch information
abvthecity committed Nov 25, 2024
1 parent 6055f62 commit 4267c28
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 1 deletion.
7 changes: 7 additions & 0 deletions fern/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ navigation:
- page: SDKs
path: docs/pages/sdks.mdx
slug: sdks
- page: Snippet Templates
path: docs/pages/snippet-templates.mdx
hidden: true
- api: API Reference

navbar-links:
Expand All @@ -45,3 +48,7 @@ logo:
href: https://buildwithfern.com/?utm_campaign=demo&utm_medium=plantstore&utm_source=logo

favicon: docs/assets/favicon.svg

experimental:
mdx-components:
- ./docs/snippets
13 changes: 13 additions & 0 deletions fern/docs/pages/snippet-templates.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import CodeSnippet from "../snippets/code-snippet.mdx";

<CodeSnippet title="Example 1" components={props.components}>
```python
print("Example 1")
```
</CodeSnippet>

<CodeSnippet title="Example 2" components={props.components}>
```python
print("Example 2")
```
</CodeSnippet>
3 changes: 3 additions & 0 deletions fern/docs/snippets/code-snippet.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## {props.title}

{props.children}
2 changes: 1 addition & 1 deletion fern/fern.config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"organization": "plantstore",
"version": "0.37.6"
"version": "0.45.0"
}
2 changes: 2 additions & 0 deletions fern/generators.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
api:
path: openapi/openapi.yaml

0 comments on commit 4267c28

Please sign in to comment.