Refactor resolveLink and expose on MarkdownPage