mirror of
https://github.com/mintlify/docs.git
synced 2026-09-14 13:35:46 +08:00
77 lines
1.7 KiB
Plaintext
77 lines
1.7 KiB
Plaintext
---
|
|
title: "Deep Relative Snippets Test"
|
|
description: "Hidden test page for validating deeply nested relative snippet imports"
|
|
---
|
|
|
|
# Deep Relative Snippets Test
|
|
|
|
This page is located at `/folder/nested/deep-relative-test.mdx` to test multi-level relative imports.
|
|
|
|
---
|
|
|
|
## Test 1: Two levels up (`../../snippets/`)
|
|
|
|
Importing from `/snippets/test-snippet-a.mdx` using `../../snippets/`:
|
|
|
|
import TestSnippetA from "../../snippets/test-snippet-a.mdx";
|
|
|
|
<TestSnippetA />
|
|
|
|
---
|
|
|
|
## Test 2: Two levels up with named export
|
|
|
|
Importing from `/snippets/test-snippet-b.mdx`:
|
|
|
|
import TestSnippetB, { testVariable } from "../../snippets/test-snippet-b.mdx";
|
|
|
|
<TestSnippetB />
|
|
|
|
**Exported variable value:** {testVariable}
|
|
|
|
---
|
|
|
|
## Test 3: One level up (`../`)
|
|
|
|
Importing from `/folder/local-snippet.mdx` (parent directory):
|
|
|
|
import LocalSnippet, { localMessage } from "../local-snippet.mdx";
|
|
|
|
<LocalSnippet />
|
|
|
|
**Exported variable value:** {localMessage}
|
|
|
|
---
|
|
|
|
## Test 4: Same directory sibling (`./`)
|
|
|
|
Importing from `/folder/nested/deep-snippet.mdx` (same directory):
|
|
|
|
import DeepSnippet, { deepMessage } from "./deep-snippet.mdx";
|
|
|
|
<DeepSnippet />
|
|
|
|
**Exported variable value:** {deepMessage}
|
|
|
|
---
|
|
|
|
## Test 5: Mixed - absolute path (for comparison)
|
|
|
|
Importing using absolute path:
|
|
|
|
import IconsRequired from "/snippets/icons-required.mdx";
|
|
|
|
<IconsRequired />
|
|
|
|
---
|
|
|
|
## Path Resolution Summary
|
|
|
|
From this page at `/folder/nested/deep-relative-test.mdx`:
|
|
|
|
| Relative Path | Resolves To |
|
|
|---------------|-------------|
|
|
| `../../snippets/test-snippet-a.mdx` | `/snippets/test-snippet-a.mdx` |
|
|
| `../local-snippet.mdx` | `/folder/local-snippet.mdx` |
|
|
| `./deep-snippet.mdx` | `/folder/nested/deep-snippet.mdx` |
|