From ce1142d4a104e69ea9f23186c273809ac46a09d7 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Mon, 27 Oct 2025 14:13:01 +0000 Subject: [PATCH 01/13] Document codeblock deep-linking feature Add documentation for the new deep-linking feature in code blocks that allows defining a links map to make specific text clickable. Includes examples for exact string matching, regex pattern matching, and combining both approaches. Co-Authored-By: Catherine Deskur --- .../default-components/code-blocks.mdx | 105 +++++++++++++++++- 1 file changed, 103 insertions(+), 2 deletions(-) diff --git a/fern/products/docs/pages/component-library/default-components/code-blocks.mdx b/fern/products/docs/pages/component-library/default-components/code-blocks.mdx index 8e38c1b95..d7f409e60 100644 --- a/fern/products/docs/pages/component-library/default-components/code-blocks.mdx +++ b/fern/products/docs/pages/component-library/default-components/code-blocks.mdx @@ -303,11 +303,112 @@ To disable scrolling and wrap overflow onto the next line, use the `wordWrap` pr +## Deep-linking + +You can make specific text within code blocks clickable by defining a `links` map. This is useful for linking to documentation, API references, or related resources directly from your code examples. + +The `links` property accepts a map where keys are matching patterns (exact strings or regex) and values are the URLs to link to. + +### Exact string matching + + + + ```typescript links={"PlantClient": "https://example.com/api/plant-client", "createPlant": "https://example.com/api/create-plant"} + import { PlantClient } from "@plantstore/sdk"; + + const client = new PlantClient({ apiKey: "YOUR_API_KEY" }); + const plant = await client.createPlant({ + name: "Monstera", + species: "Monstera deliciosa" + }); + ``` + + + ````markdown + ```typescript links={"PlantClient": "https://example.com/api/plant-client", "createPlant": "https://example.com/api/create-plant"} + import { PlantClient } from "@plantstore/sdk"; + + const client = new PlantClient({ apiKey: "YOUR_API_KEY" }); + const plant = await client.createPlant({ + name: "Monstera", + species: "Monstera deliciosa" + }); + ``` + ```` + + + The `links` property uses JSON format. Each key in the map is matched exactly against text in the code block, and matching text becomes a clickable link to the corresponding URL. + + + + +### Regex pattern matching + +You can use regex patterns for more flexible matching. This is useful when you want to link multiple variations or patterns of text. + + + + ```python links={"Plant\\w+": "https://example.com/api/plant-models", "create_\\w+": "https://example.com/api/create-methods"} + from plantstore import PlantClient, PlantConfig + + client = PlantClient(api_key="YOUR_API_KEY") + plant = client.create_plant( + name="Fiddle Leaf Fig", + species="Ficus lyrata" + ) + ``` + + + ````markdown + ```python links={"Plant\\w+": "https://example.com/api/plant-models", "create_\\w+": "https://example.com/api/create-methods"} + from plantstore import PlantClient, PlantConfig + + client = PlantClient(api_key="YOUR_API_KEY") + plant = client.create_plant( + name="Fiddle Leaf Fig", + species="Ficus lyrata" + ) + ``` + ```` + + + When using regex patterns, remember to escape special characters with double backslashes (e.g., `\\w+`, `\\d+`) in the JSON string. + + + + +### Combining exact and regex patterns + +You can mix exact string matching and regex patterns in the same `links` map: + + + + ```javascript links={"fetchPlants": "https://example.com/api/fetch", "Plant\\w+": "https://example.com/api/types"} + async function fetchPlants() { + const response = await fetch('/api/plants'); + const data: PlantResponse = await response.json(); + return data.plants; + } + ``` + + + ````markdown + ```javascript links={"fetchPlants": "https://example.com/api/fetch", "Plant\\w+": "https://example.com/api/types"} + async function fetchPlants() { + const response = await fetch('/api/plants'); + const data: PlantResponse = await response.json(); + return data.plants; + } + ``` + ```` + + + ## Combining props -You can combine the `title`, `highlight`, `focus`, `startLine`, `maxLines`, and `wordWrap` +You can combine the `title`, `highlight`, `focus`, `startLine`, `maxLines`, `wordWrap`, and `links` props to create a code block with a title, highlighted lines, specific starting line, -and a maximum height. +a maximum height, and clickable links. From f24b4a2ac02f8bf2736296f246704155cbedf151 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Mon, 27 Oct 2025 15:20:44 +0000 Subject: [PATCH 02/13] Add hidden demo page for deep-linking examples - Created new hidden demo page at /docs/writing-content/demo with API documentation examples - Updated all deep-linking examples in code-blocks.mdx to link to demo page sections - Added demo page to docs.yml navigation with hidden: true flag - Demo page includes PlantClient, PlantConfig, createPlant, create_plant, fetchPlants, and PlantResponse examples Co-Authored-By: Catherine Deskur --- fern/products/docs/docs.yml | 4 + .../default-components/code-blocks.mdx | 12 +-- .../docs/pages/component-library/demo.mdx | 94 +++++++++++++++++++ 3 files changed, 104 insertions(+), 6 deletions(-) create mode 100644 fern/products/docs/pages/component-library/demo.mdx diff --git a/fern/products/docs/docs.yml b/fern/products/docs/docs.yml index eac98df90..d183e245f 100644 --- a/fern/products/docs/docs.yml +++ b/fern/products/docs/docs.yml @@ -111,6 +111,10 @@ navigation: - page: Conditionally rendered content hidden: true path: ./pages/component-library/custom-components/conditional-rendering.mdx + - page: Component demos + hidden: true + path: ./pages/component-library/demo.mdx + slug: demo - section: AI features contents: - link: Ask Fern diff --git a/fern/products/docs/pages/component-library/default-components/code-blocks.mdx b/fern/products/docs/pages/component-library/default-components/code-blocks.mdx index d7f409e60..1f723ad2f 100644 --- a/fern/products/docs/pages/component-library/default-components/code-blocks.mdx +++ b/fern/products/docs/pages/component-library/default-components/code-blocks.mdx @@ -313,7 +313,7 @@ The `links` property accepts a map where keys are matching patterns (exact strin - ```typescript links={"PlantClient": "https://example.com/api/plant-client", "createPlant": "https://example.com/api/create-plant"} + ```typescript links={"PlantClient": "/docs/writing-content/demo#plantclient", "createPlant": "/docs/writing-content/demo#createplant"} import { PlantClient } from "@plantstore/sdk"; const client = new PlantClient({ apiKey: "YOUR_API_KEY" }); @@ -325,7 +325,7 @@ The `links` property accepts a map where keys are matching patterns (exact strin ````markdown - ```typescript links={"PlantClient": "https://example.com/api/plant-client", "createPlant": "https://example.com/api/create-plant"} + ```typescript links={"PlantClient": "/docs/writing-content/demo#plantclient", "createPlant": "/docs/writing-content/demo#createplant"} import { PlantClient } from "@plantstore/sdk"; const client = new PlantClient({ apiKey: "YOUR_API_KEY" }); @@ -348,7 +348,7 @@ You can use regex patterns for more flexible matching. This is useful when you w - ```python links={"Plant\\w+": "https://example.com/api/plant-models", "create_\\w+": "https://example.com/api/create-methods"} + ```python links={"Plant\\w+": "/docs/writing-content/demo#type-definitions", "create_\\w+": "/docs/writing-content/demo#create_plant"} from plantstore import PlantClient, PlantConfig client = PlantClient(api_key="YOUR_API_KEY") @@ -360,7 +360,7 @@ You can use regex patterns for more flexible matching. This is useful when you w ````markdown - ```python links={"Plant\\w+": "https://example.com/api/plant-models", "create_\\w+": "https://example.com/api/create-methods"} + ```python links={"Plant\\w+": "/docs/writing-content/demo#type-definitions", "create_\\w+": "/docs/writing-content/demo#create_plant"} from plantstore import PlantClient, PlantConfig client = PlantClient(api_key="YOUR_API_KEY") @@ -383,7 +383,7 @@ You can mix exact string matching and regex patterns in the same `links` map: - ```javascript links={"fetchPlants": "https://example.com/api/fetch", "Plant\\w+": "https://example.com/api/types"} + ```javascript links={"fetchPlants": "/docs/writing-content/demo#fetchplants", "Plant\\w+": "/docs/writing-content/demo#plantresponse"} async function fetchPlants() { const response = await fetch('/api/plants'); const data: PlantResponse = await response.json(); @@ -393,7 +393,7 @@ You can mix exact string matching and regex patterns in the same `links` map: ````markdown - ```javascript links={"fetchPlants": "https://example.com/api/fetch", "Plant\\w+": "https://example.com/api/types"} + ```javascript links={"fetchPlants": "/docs/writing-content/demo#fetchplants", "Plant\\w+": "/docs/writing-content/demo#plantresponse"} async function fetchPlants() { const response = await fetch('/api/plants'); const data: PlantResponse = await response.json(); diff --git a/fern/products/docs/pages/component-library/demo.mdx b/fern/products/docs/pages/component-library/demo.mdx new file mode 100644 index 000000000..111d64786 --- /dev/null +++ b/fern/products/docs/pages/component-library/demo.mdx @@ -0,0 +1,94 @@ +--- +title: Component demos +hidden: true +--- + +This page contains demo content for testing and showcasing various documentation components. It's hidden from navigation but can be linked to from examples. + +## API client examples + +### PlantClient + +The `PlantClient` class is the main entry point for interacting with the Plant Store API. It handles authentication, request management, and provides access to all API endpoints. + +**Constructor parameters:** +- `apiKey` (string, required): Your API authentication key +- `baseUrl` (string, optional): Custom API base URL for testing +- `timeout` (number, optional): Request timeout in milliseconds + +**Example usage:** +```typescript +import { PlantClient } from "@plantstore/sdk"; + +const client = new PlantClient({ + apiKey: "your-api-key-here" +}); +``` + +### PlantConfig + +Configuration object for customizing the Plant Store SDK behavior. + +**Properties:** +- `retryAttempts` (number): Number of retry attempts for failed requests +- `cacheEnabled` (boolean): Enable response caching +- `logLevel` (string): Logging verbosity level + +### createPlant + +Creates a new plant entry in the database. + +**Parameters:** +- `name` (string, required): Common name of the plant +- `species` (string, required): Scientific species name +- `description` (string, optional): Plant description +- `careLevel` (string, optional): Care difficulty level + +**Returns:** Promise resolving to the created plant object + +**Example:** +```typescript +const plant = await client.createPlant({ + name: "Monstera", + species: "Monstera deliciosa", + careLevel: "easy" +}); +``` + +## API method examples + +### create_plant + +Python method for creating a new plant entry. + +**Signature:** +```python +def create_plant( + name: str, + species: str, + description: Optional[str] = None, + care_level: Optional[str] = None +) -> Plant +``` + +### fetchPlants + +Retrieves a list of plants from the API with optional filtering. + +**Parameters:** +- `filters` (object, optional): Filter criteria +- `limit` (number, optional): Maximum number of results +- `offset` (number, optional): Pagination offset + +**Returns:** Promise resolving to an array of plant objects + +## Type definitions + +### PlantResponse + +Response object returned from plant-related API calls. + +**Properties:** +- `plants` (Array): List of plant objects +- `total` (number): Total count of plants +- `hasMore` (boolean): Whether more results are available From d0c14819c8a27be61664be7876394874c58ae1e2 Mon Sep 17 00:00:00 2001 From: Catherine Deskur <46695336+chdeskur@users.noreply.github.com> Date: Mon, 27 Oct 2025 12:03:30 -0400 Subject: [PATCH 03/13] Update code-blocks.mdx --- .../default-components/code-blocks.mdx | 51 ++++++++----------- 1 file changed, 20 insertions(+), 31 deletions(-) diff --git a/fern/products/docs/pages/component-library/default-components/code-blocks.mdx b/fern/products/docs/pages/component-library/default-components/code-blocks.mdx index 1f723ad2f..cb07007e7 100644 --- a/fern/products/docs/pages/component-library/default-components/code-blocks.mdx +++ b/fern/products/docs/pages/component-library/default-components/code-blocks.mdx @@ -313,7 +313,10 @@ The `links` property accepts a map where keys are matching patterns (exact strin - ```typescript links={"PlantClient": "/docs/writing-content/demo#plantclient", "createPlant": "/docs/writing-content/demo#createplant"} + + ```typescript import { PlantClient } from "@plantstore/sdk"; const client = new PlantClient({ apiKey: "YOUR_API_KEY" }); @@ -322,10 +325,14 @@ The `links` property accepts a map where keys are matching patterns (exact strin species: "Monstera deliciosa" }); ``` + ````markdown - ```typescript links={"PlantClient": "/docs/writing-content/demo#plantclient", "createPlant": "/docs/writing-content/demo#createplant"} + + ```typescript import { PlantClient } from "@plantstore/sdk"; const client = new PlantClient({ apiKey: "YOUR_API_KEY" }); @@ -334,6 +341,7 @@ The `links` property accepts a map where keys are matching patterns (exact strin species: "Monstera deliciosa" }); ``` + ```` @@ -348,7 +356,10 @@ You can use regex patterns for more flexible matching. This is useful when you w - ```python links={"Plant\\w+": "/docs/writing-content/demo#type-definitions", "create_\\w+": "/docs/writing-content/demo#create_plant"} + + ```python from plantstore import PlantClient, PlantConfig client = PlantClient(api_key="YOUR_API_KEY") @@ -357,10 +368,14 @@ You can use regex patterns for more flexible matching. This is useful when you w species="Ficus lyrata" ) ``` + ````markdown - ```python links={"Plant\\w+": "/docs/writing-content/demo#type-definitions", "create_\\w+": "/docs/writing-content/demo#create_plant"} + + ```python from plantstore import PlantClient, PlantConfig client = PlantClient(api_key="YOUR_API_KEY") @@ -369,6 +384,7 @@ You can use regex patterns for more flexible matching. This is useful when you w species="Ficus lyrata" ) ``` + ```` @@ -377,33 +393,6 @@ You can use regex patterns for more flexible matching. This is useful when you w -### Combining exact and regex patterns - -You can mix exact string matching and regex patterns in the same `links` map: - - - - ```javascript links={"fetchPlants": "/docs/writing-content/demo#fetchplants", "Plant\\w+": "/docs/writing-content/demo#plantresponse"} - async function fetchPlants() { - const response = await fetch('/api/plants'); - const data: PlantResponse = await response.json(); - return data.plants; - } - ``` - - - ````markdown - ```javascript links={"fetchPlants": "/docs/writing-content/demo#fetchplants", "Plant\\w+": "/docs/writing-content/demo#plantresponse"} - async function fetchPlants() { - const response = await fetch('/api/plants'); - const data: PlantResponse = await response.json(); - return data.plants; - } - ``` - ```` - - - ## Combining props You can combine the `title`, `highlight`, `focus`, `startLine`, `maxLines`, `wordWrap`, and `links` From 8e0bbfa5e5682331684f58c9f0fc1d9a8c5099c3 Mon Sep 17 00:00:00 2001 From: Catherine Deskur <46695336+chdeskur@users.noreply.github.com> Date: Mon, 27 Oct 2025 12:06:44 -0400 Subject: [PATCH 04/13] Update code-blocks.mdx --- .../component-library/default-components/code-blocks.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fern/products/docs/pages/component-library/default-components/code-blocks.mdx b/fern/products/docs/pages/component-library/default-components/code-blocks.mdx index cb07007e7..7ce7d5afd 100644 --- a/fern/products/docs/pages/component-library/default-components/code-blocks.mdx +++ b/fern/products/docs/pages/component-library/default-components/code-blocks.mdx @@ -314,7 +314,7 @@ The `links` property accepts a map where keys are matching patterns (exact strin ```typescript import { PlantClient } from "@plantstore/sdk"; @@ -330,7 +330,7 @@ The `links` property accepts a map where keys are matching patterns (exact strin ````markdown ```typescript import { PlantClient } from "@plantstore/sdk"; @@ -357,7 +357,7 @@ You can use regex patterns for more flexible matching. This is useful when you w ```python from plantstore import PlantClient, PlantConfig @@ -373,7 +373,7 @@ You can use regex patterns for more flexible matching. This is useful when you w ````markdown ```python from plantstore import PlantClient, PlantConfig From 1a640df17dbb3b681171293458a05afcbf813794 Mon Sep 17 00:00:00 2001 From: Catherine Deskur <46695336+chdeskur@users.noreply.github.com> Date: Mon, 27 Oct 2025 12:12:51 -0400 Subject: [PATCH 05/13] Update code-blocks.mdx --- .../pages/component-library/default-components/code-blocks.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fern/products/docs/pages/component-library/default-components/code-blocks.mdx b/fern/products/docs/pages/component-library/default-components/code-blocks.mdx index 7ce7d5afd..c72fe2662 100644 --- a/fern/products/docs/pages/component-library/default-components/code-blocks.mdx +++ b/fern/products/docs/pages/component-library/default-components/code-blocks.mdx @@ -330,7 +330,7 @@ The `links` property accepts a map where keys are matching patterns (exact strin ````markdown ```typescript import { PlantClient } from "@plantstore/sdk"; From de6fe539c2ac1e59667c03997b5da2a4efe77618 Mon Sep 17 00:00:00 2001 From: Catherine Deskur <46695336+chdeskur@users.noreply.github.com> Date: Mon, 27 Oct 2025 12:41:51 -0400 Subject: [PATCH 06/13] Update code-blocks.mdx --- .../component-library/default-components/code-blocks.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fern/products/docs/pages/component-library/default-components/code-blocks.mdx b/fern/products/docs/pages/component-library/default-components/code-blocks.mdx index c72fe2662..864c3fe7a 100644 --- a/fern/products/docs/pages/component-library/default-components/code-blocks.mdx +++ b/fern/products/docs/pages/component-library/default-components/code-blocks.mdx @@ -357,7 +357,7 @@ You can use regex patterns for more flexible matching. This is useful when you w ```python from plantstore import PlantClient, PlantConfig @@ -373,7 +373,7 @@ You can use regex patterns for more flexible matching. This is useful when you w ````markdown ```python from plantstore import PlantClient, PlantConfig From 682d65e41e108ef6bb193624d0ad12c0a9d2e8d6 Mon Sep 17 00:00:00 2001 From: Catherine Deskur <46695336+chdeskur@users.noreply.github.com> Date: Mon, 27 Oct 2025 12:43:11 -0400 Subject: [PATCH 07/13] Update code-blocks.mdx --- .../component-library/default-components/code-blocks.mdx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fern/products/docs/pages/component-library/default-components/code-blocks.mdx b/fern/products/docs/pages/component-library/default-components/code-blocks.mdx index 864c3fe7a..45ca1da96 100644 --- a/fern/products/docs/pages/component-library/default-components/code-blocks.mdx +++ b/fern/products/docs/pages/component-library/default-components/code-blocks.mdx @@ -309,12 +309,14 @@ You can make specific text within code blocks clickable by defining a `links` ma The `links` property accepts a map where keys are matching patterns (exact strings or regex) and values are the URLs to link to. +**For sites using custom subpaths**: be sure to include the base subpath in relative links. + ### Exact string matching ```typescript import { PlantClient } from "@plantstore/sdk"; @@ -330,7 +332,7 @@ The `links` property accepts a map where keys are matching patterns (exact strin ````markdown ```typescript import { PlantClient } from "@plantstore/sdk"; From 2f0c886b77364318689ab626e6dd132f252261ac Mon Sep 17 00:00:00 2001 From: Catherine Deskur <46695336+chdeskur@users.noreply.github.com> Date: Mon, 27 Oct 2025 12:54:44 -0400 Subject: [PATCH 08/13] Update code-blocks.mdx --- .../component-library/default-components/code-blocks.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fern/products/docs/pages/component-library/default-components/code-blocks.mdx b/fern/products/docs/pages/component-library/default-components/code-blocks.mdx index 45ca1da96..022562407 100644 --- a/fern/products/docs/pages/component-library/default-components/code-blocks.mdx +++ b/fern/products/docs/pages/component-library/default-components/code-blocks.mdx @@ -359,7 +359,7 @@ You can use regex patterns for more flexible matching. This is useful when you w ```python from plantstore import PlantClient, PlantConfig @@ -375,7 +375,7 @@ You can use regex patterns for more flexible matching. This is useful when you w ````markdown ```python from plantstore import PlantClient, PlantConfig From b1b7945f6af2b580543bdf93eb2487bffad61b6f Mon Sep 17 00:00:00 2001 From: Devin Logan Date: Mon, 27 Oct 2025 14:14:19 -0400 Subject: [PATCH 09/13] small updates for clarity --- .../default-components/code-blocks.mdx | 59 ++++++++++--------- .../docs/pages/component-library/demo.mdx | 24 ++++++++ 2 files changed, 55 insertions(+), 28 deletions(-) diff --git a/fern/products/docs/pages/component-library/default-components/code-blocks.mdx b/fern/products/docs/pages/component-library/default-components/code-blocks.mdx index 022562407..ba51cb9b8 100644 --- a/fern/products/docs/pages/component-library/default-components/code-blocks.mdx +++ b/fern/products/docs/pages/component-library/default-components/code-blocks.mdx @@ -1,6 +1,7 @@ --- title: 'Code Blocks' description: 'Learn how to enhance your documentation with customizable code blocks featuring syntax highlighting, line highlighting, focusing, and more.' +max-toc-depth: 2 --- Fern uses [Shiki](https://shiki.matsu.io/) for syntax highlighting in code blocks. @@ -303,7 +304,7 @@ To disable scrolling and wrap overflow onto the next line, use the `wordWrap` pr -## Deep-linking +## Deep linking You can make specific text within code blocks clickable by defining a `links` map. This is useful for linking to documentation, API references, or related resources directly from your code examples. @@ -345,55 +346,57 @@ The `links` property accepts a map where keys are matching patterns (exact strin ``` ```` - - - The `links` property uses JSON format. Each key in the map is matched exactly against text in the code block, and matching text becomes a clickable link to the corresponding URL. - + + The `links` property uses JSON format. Each key in the map is matched exactly against text in the Code Block, and matching text becomes a clickable link to the corresponding URL. + + ### Regex pattern matching -You can use regex patterns for more flexible matching. This is useful when you want to link multiple variations or patterns of text. +You can use regex patterns for more flexible matching. This is useful when you want to link multiple variations or patterns of text. + +In the example below, the pattern `/get\\w+/` matches both `getPlant` and `getGarden`, while `/Plant(Store|Client)/` matches both `PlantStore` and `PlantClient`. ```python - from plantstore import PlantClient, PlantConfig + from plantstore import PlantStore, PlantClient - client = PlantClient(api_key="YOUR_API_KEY") - plant = client.create_plant( - name="Fiddle Leaf Fig", - species="Ficus lyrata" - ) + store = PlantStore(api_key="YOUR_API_KEY") + client = PlantClient(store) + + plant = store.getPlant(plant_id="123") + garden = store.getGarden(garden_id="456") ``` ````markdown - ```python - from plantstore import PlantClient, PlantConfig - - client = PlantClient(api_key="YOUR_API_KEY") - plant = client.create_plant( - name="Fiddle Leaf Fig", - species="Ficus lyrata" - ) + ```python + from plantstore import PlantStore, PlantClient + + store = PlantStore(api_key="YOUR_API_KEY") + client = PlantClient(store) + + plant = store.getPlant(plant_id="123") + garden = store.getGarden(garden_id="456") ``` ```` + + - + When using regex patterns, remember to escape special characters with double backslashes (e.g., `\\w+`, `\\d+`) in the JSON string. - - ## Combining props @@ -403,7 +406,7 @@ a maximum height, and clickable links. - ```javascript title="Hello, World!" {6-8} maxLines=5 startLine={4} + ```javascript title="Hello, World!" {6-8} maxLines=5 startLine={4} links={{"console": "/learn/docs/writing-content/demo"}} console.log("Line 1"); console.log("Line 2"); console.log("Line 3"); @@ -417,8 +420,8 @@ a maximum height, and clickable links. ``` - ````markdown maxLines=5 - ```javascript title="Hello, World!" {6-8} maxLines=5 startLine={4} + ````markdown + ```javascript title="Hello, World!" {6-8} maxLines=5 startLine={4} links={{"console": "/learn/docs/writing-content/demo"}} console.log("Line 1"); console.log("Line 2"); console.log("Line 3"); diff --git a/fern/products/docs/pages/component-library/demo.mdx b/fern/products/docs/pages/component-library/demo.mdx index 111d64786..95749f4c1 100644 --- a/fern/products/docs/pages/component-library/demo.mdx +++ b/fern/products/docs/pages/component-library/demo.mdx @@ -84,6 +84,21 @@ Retrieves a list of plants from the API with optional filtering. ## Type definitions +### PlantStore + +The `PlantStore` class manages plant data storage and retrieval operations. + +**Constructor parameters:** +- `apiKey` (string, required): Your API authentication key +- `config` (PlantConfig, optional): Configuration options + +### PlantClient + +The `PlantClient` class provides a client interface for interacting with PlantStore. + +**Constructor parameters:** +- `store` (PlantStore, required): PlantStore instance to use + ### PlantResponse Response object returned from plant-related API calls. @@ -92,3 +107,12 @@ Response object returned from plant-related API calls. - `plants` (Array): List of plant objects - `total` (number): Total count of plants - `hasMore` (boolean): Whether more results are available + +## Get methods + +Common retrieval methods for accessing plant store resources. + +| Method | Description | Parameters | Returns | +|--------|-------------|------------|---------| +| `getPlant` | Retrieves a single plant by its ID | `plant_id` (string, required): The unique identifier of the plant | Plant object | +| `getGarden` | Retrieves a single garden by its ID | `garden_id` (string, required): The unique identifier of the garden | Garden object | From a37a0064f681f0674a35d4b55c9324612377c59c Mon Sep 17 00:00:00 2001 From: Devin Logan Date: Mon, 27 Oct 2025 14:18:52 -0400 Subject: [PATCH 10/13] fix vale --- .github/workflows/vale.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/vale.yml b/.github/workflows/vale.yml index 6f7567eb5..6bb6cc2df 100644 --- a/.github/workflows/vale.yml +++ b/.github/workflows/vale.yml @@ -18,7 +18,5 @@ jobs: - uses: actions/checkout@v4 - uses: errata-ai/vale-action@reviewdog - with: - files: fern env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} \ No newline at end of file From 8b59d97e24aff0f01c4e2763ca0fcfc0c1bd517a Mon Sep 17 00:00:00 2001 From: Devin Logan Date: Mon, 27 Oct 2025 14:22:24 -0400 Subject: [PATCH 11/13] fix vale --- .github/workflows/vale.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/vale.yml b/.github/workflows/vale.yml index 6bb6cc2df..c410bd7e0 100644 --- a/.github/workflows/vale.yml +++ b/.github/workflows/vale.yml @@ -6,7 +6,6 @@ on: - '**.md' - '.vale/**' - '.vale.ini' - - '!**/changelog/**' jobs: vale: @@ -18,5 +17,7 @@ jobs: - uses: actions/checkout@v4 - uses: errata-ai/vale-action@reviewdog + with: + files: fern env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} \ No newline at end of file From 4c80cb35a2180bbb081a9a303c812a9b76e79f70 Mon Sep 17 00:00:00 2001 From: Devin Logan Date: Mon, 27 Oct 2025 14:23:40 -0400 Subject: [PATCH 12/13] fix vale --- .github/workflows/vale.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/vale.yml b/.github/workflows/vale.yml index c410bd7e0..ff0f37c43 100644 --- a/.github/workflows/vale.yml +++ b/.github/workflows/vale.yml @@ -19,5 +19,6 @@ jobs: - uses: errata-ai/vale-action@reviewdog with: files: fern + version: 3.12.0 env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} \ No newline at end of file From cb773827a4252c232af1fc45dfd5f0e60b5caa30 Mon Sep 17 00:00:00 2001 From: Devin Logan Date: Mon, 27 Oct 2025 14:36:20 -0400 Subject: [PATCH 13/13] small wording fix --- .../pages/component-library/default-components/code-blocks.mdx | 2 -- 1 file changed, 2 deletions(-) diff --git a/fern/products/docs/pages/component-library/default-components/code-blocks.mdx b/fern/products/docs/pages/component-library/default-components/code-blocks.mdx index ba51cb9b8..90efb4d18 100644 --- a/fern/products/docs/pages/component-library/default-components/code-blocks.mdx +++ b/fern/products/docs/pages/component-library/default-components/code-blocks.mdx @@ -310,8 +310,6 @@ You can make specific text within code blocks clickable by defining a `links` ma The `links` property accepts a map where keys are matching patterns (exact strings or regex) and values are the URLs to link to. -**For sites using custom subpaths**: be sure to include the base subpath in relative links. - ### Exact string matching