mirror of
https://github.com/garraflavatra/rolens.git
synced 2025-01-18 13:07:58 +00:00
Fix "edit this page on GH" link on documentation website
This commit is contained in:
parent
3dbf8fc98b
commit
eba7e84fc8
@ -1,3 +1,5 @@
|
|||||||
|
const path = require('path');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
eleventyNavigation: {
|
eleventyNavigation: {
|
||||||
key: data => data.title,
|
key: data => data.title,
|
||||||
@ -12,6 +14,6 @@ module.exports = {
|
|||||||
github: {
|
github: {
|
||||||
reportDocsIssue: data => `${data.meta.repoUrl}/issues/new?assignees=garraflavatra&labels=documentation&projects=&template=docs.yml&source=${encodeURIComponent(data.meta.siteUrl + data.page.url)}`,
|
reportDocsIssue: data => `${data.meta.repoUrl}/issues/new?assignees=garraflavatra&labels=documentation&projects=&template=docs.yml&source=${encodeURIComponent(data.meta.siteUrl + data.page.url)}`,
|
||||||
licenseUrl: data => `${data.meta.repoUrl}/blob/main/LICENSE`,
|
licenseUrl: data => `${data.meta.repoUrl}/blob/main/LICENSE`,
|
||||||
pageSourceUrl: data => `${data.meta.repoUrl}/blob/main/${data.page.inputPath}`,
|
pageSourceUrl: data => `${data.meta.repoUrl}/blob/main/${path.relative(process.cwd(), data.page.inputPath)}`,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -7,7 +7,7 @@ module.exports = async function() {
|
|||||||
return { stars: json.stargazers_count || 0 };
|
return { stars: json.stargazers_count || 0 };
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
console.error('ERROR | Could not fetch GitHub stars:', error);
|
console.error('Error: could not fetch GitHub stars:', error);
|
||||||
return { stars: 0 };
|
return { stars: 0 };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user