Lines Matching refs:path
1 export function githubUrl(path: string) {
2 if (path === '/versions/latest' || path === '/versions/unversioned') {
3 path = '/versions/unversioned/index';
4 } else if (path === '/eas' || path === '/eas/') {
5 path = '/eas/index';
6 } else if (path === '/feature-preview' || path === '/feature-preview/') {
7 path = '/feature-preview/index';
10 if (path.includes('/versions/latest/')) {
11 path = path.replace('/versions/latest/', '/versions/unversioned/');
12 } else if (path.match(/v\d+\.\d+\.\d+\/?$/) || path === '/') {
13 if (path[path.length - 1] === '/') {
14 path = `${path}index`;
16 path = `${path}/index`;
21 path.replace(/\/$/, '').replace('/versions/latest', '/versions/unversioned') + '.mdx';