Skip to main content

Improvements to Internal Linking in SDK README Files

· 2 min read

Hyperlinks in multi-file docs are now truly relative so they will work correctly irrespective of which level the SDK is placed in the GitHub repository.

Last year, we released multi-page documentation in SDKs, details of which can be read in the APIMatic v3 announcement changelog. This helped overcome a limitation in GitHub (and other source code hosting platforms) that resulted in the README.md file being cut off because it was too long to display on one page.

To implement the multi-page structure, an additional doc directory inside the generated SDKs contained the parts of the documentation which were linked on the main README.md page. We used absolute hyperlinks in the README.md to refer to other files present in the doc folder in the SDK.

Everything worked as intended when the SDK and README were placed at the root of the GitHub repository. However, if the SDK was moved to a deeper level than the root, then some of the links referred to in the README.md file got broken.

Absolute links in README

This has now been fixed to support relative links in the README, and the hyperlinks will work irrespective of where the SDK has been placed in the GitHub repository.

Relative links in README