Description
The issue is about creating a custom plugin that identifies internal and external type by string matching. Then it should wrap internal links with next Link component & for external links the link should open in a new tab.
Steps
- Create a new file
withNextLinks inside src/lib/mdx/rehype
- Build an rehype plugin using visit function
- Import the the plugin in getMdxComponents and enlist that plugin with rehypePlugins list
Screenshots
N/A
Additional Information
This feature will improve documentation experience. And will prevent unnecessary link opening and also will leverage the power of next Link component.