Open MDX Partial
Quickly access mapped partial files from MDX component tags like <PartialExample name="Test" /> via Go to Definition.
Configuration
Set mdxOpenPartial.pattern to a file path pattern that includes placeholders for the original name or slug name.
Pattern placeholders:
$1 = tag name (for example, PartialExample)
$2 = slugged tag name (for example, partial-example)
Example:
{
"mdxOpenPartial.pattern": "/Users/me/repos/docs/static/snippets/$1.md"
}
With this pattern, Cmd/Ctrl-clicking PartialExample opens:
/Users/me/repos/docs/static/snippets/PartialExample.md
With the $2 placeholder, Cmd/Ctrl-clicking PartialExample opens:
/Users/me/repos/docs/static/snippets/partial-example.md
| |