You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I searched issues and couldn’t find anything (or linked relevant results below)
Problem
Hi there,
I was trying to use variables to manage links inside my documentation. My objective is to use variables for almost all of my links inside my docs to centralise links management.
I had declared an object that contains all my links like that:
[the url should be "bar", but is literal {Links.foo}]({Links.foo})
Should be:
[the url should be "bar", but is literal {Links.foo}](bar)
Solution
I don't have much knowledge about js or mdx, but my guess would be to parse and interpret brackets expressions inside the link () part of a []() markdown link.
Please ! Check my cool [website](https://facebook.com)
Alternatives
I saw the documentation about components used for rendering, maybe there is an escape hatch that I could use to override the component that manage links ?
(I am not a react developer, so I don't know about either the possibility or how to do it.)
Feel free to correct me or pointing me to a solution I could implement. Thank you for your time in advance. :)
The text was updated successfully, but these errors were encountered:
Initial checklist
Problem
Hi there,
I was trying to use variables to manage links inside my documentation. My objective is to use variables for almost all of my links inside my docs to centralise links management.
I had declared an object that contains all my links like that:
And I try to use those variables as link uri in a markdown link tag
[Description]({Links.foo})
The issue is that MDX seems to not interpret the variable inside the
()
so the rendered content has this result :Rendering:
Should be:
Solution
I don't have much knowledge about js or mdx, but my guess would be to parse and interpret brackets expressions inside the link
()
part of a[]()
markdown link.This example below should work:
Rendered as:
Alternatives
I saw the documentation about components used for rendering, maybe there is an escape hatch that I could use to override the component that manage links ?
(I am not a react developer, so I don't know about either the possibility or how to do it.)
Feel free to correct me or pointing me to a solution I could implement. Thank you for your time in advance. :)
The text was updated successfully, but these errors were encountered: