When there's extention in the sidebar item links, such as `.md` or `.html`, the "next and prev link" is failing. This commit fixes that issue.