24 |
|
|
25 |
const urlEncodedPath = `docs/app${ |
const urlEncodedPath = `docs/app${ |
26 |
pathname === "/" ? "" : "/(docs)" |
pathname === "/" ? "" : "/(docs)" |
27 |
}${pathname.trim() + (pathname === "/" ? "/" : "")}page.${pageExtension}`; |
}${pathname.trim() + (pathname[pathname.length - 1] !== "/" || pathname === "/" ? "/" : "")}page.${pageExtension}`; |
28 |
|
|
29 |
const githubURL = pathname |
const githubURL = pathname |
30 |
? `https://api.github.com/repos/onesoft-sudo/sudobot/commits?path=${encodeURIComponent(urlEncodedPath)}&sha=${encodeURIComponent(branch)}` |
? `https://api.github.com/repos/onesoft-sudo/sudobot/commits?path=${encodeURIComponent(urlEncodedPath)}&sha=${encodeURIComponent(branch)}` |