Files
mintlify__docs/folder/relative-snippets-test.mdx
Han Wang a3a6ae6de5 Add msg
2026-01-06 15:11:38 -08:00

77 lines
1.7 KiB
Plaintext

---
title: "Relative Snippets Test"
description: "Hidden test page for validating relative snippet imports"
---
# Relative Snippets Test Page
This is a hidden test page to validate relative snippet import functionality.
---
## Test 1: Parent directory import (`../snippets/`)
Importing from `/snippets/test-snippet-a.mdx` using `../snippets/test-snippet-a.mdx`:
import TestSnippetA from "../snippets/test-snippet-a.mdx";
<TestSnippetA />
---
## Test 2: Parent directory import with named export
Importing `testVariable` from `/snippets/test-snippet-b.mdx`:
import TestSnippetB from "../snippets/test-snippet-b.mdx";
<TestSnippetB />
**Exported variable value:** {testVariable}
---
## Test 3: Same directory import (`./`)
Importing from `local-snippet.mdx` in the same folder:
import LocalSnippet, { localMessage } from "./local-snippet.mdx";
<LocalSnippet />
**Exported variable value:** {localMessage}
---
## Test 4: Child directory import (`./nested/`)
Importing from `nested/deep-snippet.mdx`:
import DeepSnippet, { deepMessage } from "./nested/deep-snippet.mdx";
<DeepSnippet />
**Exported variable value:** {deepMessage}
---
## Test 5: Absolute import (for comparison)
Importing using absolute path `/snippets/icons-optional.mdx`:
import IconsOptional from "/snippets/icons-optional.mdx";
<IconsOptional />
---
## Summary
| Test | Import Path | Type | Status |
|------|-------------|------|--------|
| 1 | `../snippets/test-snippet-a.mdx` | Parent dir | Check above |
| 2 | `../snippets/test-snippet-b.mdx` | Parent dir + export | Check above |
| 3 | `./local-snippet.mdx` | Same dir | Check above |
| 4 | `./nested/deep-snippet.mdx` | Child dir | Check above |
| 5 | `/snippets/icons-optional.mdx` | Absolute | Check above |