diff --git a/src/utils/rewriteAPILink.ts b/src/utils/rewriteAPILink.ts index c9fe60c..4305c3c 100644 --- a/src/utils/rewriteAPILink.ts +++ b/src/utils/rewriteAPILink.ts @@ -1,9 +1,11 @@ +import { getCurrentVersion } from './nodes'; + /** * If an href is preceded with api:, rewrite it to the api.silverstripe.org site * @param link */ const rewriteAPILink = (link: string): string => { - const version = 4; + const version = getCurrentVersion(); const match = link.match(/api\:(.*)/); if (!match) { console.error(`Unable to resolve api link ${link}!`);