Skip to content

Commit 682d65e

Browse files
authored
Update code-blocks.mdx
1 parent de6fe53 commit 682d65e

File tree

1 file changed

+4
-2
lines changed
  • fern/products/docs/pages/component-library/default-components

1 file changed

+4
-2
lines changed

fern/products/docs/pages/component-library/default-components/code-blocks.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,12 +309,14 @@ You can make specific text within code blocks clickable by defining a `links` ma
309309

310310
The `links` property accepts a map where keys are matching patterns (exact strings or regex) and values are the URLs to link to.
311311

312+
**For sites using custom subpaths**: be sure to include the base subpath in relative links.
313+
312314
### Exact string matching
313315

314316
<Tabs>
315317
<Tab title="Example">
316318
<CodeBlock
317-
links={{"PlantClient": "/docs/writing-content/demo#plantclient", "createPlant": "/docs/writing-content/demo#createplant"}}
319+
links={{"PlantClient": "/learn/docs/writing-content/demo#plantclient", "createPlant": "/learn/docs/writing-content/demo#createplant"}}
318320
>
319321
```typescript
320322
import { PlantClient } from "@plantstore/sdk";
@@ -330,7 +332,7 @@ The `links` property accepts a map where keys are matching patterns (exact strin
330332
<Tab title="Markdown">
331333
````markdown
332334
<CodeBlock
333-
links={{"PlantClient": "/docs/writing-content/demo#plantclient", "createPlant": "/docs/writing-content/demo#create_plant"}}
335+
links={{"PlantClient": "/learn/docs/writing-content/demo#plantclient", "createPlant": "/learn/docs/writing-content/demo#create_plant"}}
334336
>
335337
```typescript
336338
import { PlantClient } from "@plantstore/sdk";

0 commit comments

Comments
 (0)