formidable-landers
formidable-landers copied to clipboard
React Router should handle internal page links generated in markdown
The markdown renderers turn links into <a> tags, which naturally are not handled by react router. If they are links to internal pages, they should be intercepted and handled by react-router. If they are relative links, they should work both on github.com and on the dox site.
- [ ] For relative links to work on both github and the dox site, some adjustments need to be made to the paths. For example, github might link to
../guides/other-guide.mdwhereas the dox site equivalent would be../../guides/other-guide/, see example implementation onformidable-playbook-docs. - [ ] Next, to prevent a full page reload of internal pages, the
<a>links need to be intercepted and handled with react-router, see example implementation onspectacle-docs.