We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1cbfbe2 commit 63587e6Copy full SHA for 63587e6
api/link.js
@@ -32,7 +32,24 @@ export default function handler(request, response) {
32
33
} else {
34
35
- title = repoName + ' on Codeit';
+ let parsedDir = url.split('/');
36
+
37
+ parsedDir[1] = repo.split(':')[0];
38
39
+ if (query.url.startsWith('https://github.com') ||
40
+ query.url.startsWith('https:/github.com')) {
41
42
+ if (parsedDir[2] === 'blob') {
43
44
+ parsedDir.splice(2, 2);
45
46
+ }
47
48
49
50
+ parsedDir = parsedDir.join('/');
51
52
+ title = parsedDir + ' on Codeit';
53
54
}
55
0 commit comments