mirror of
https://github.com/Fechin/reference.git
synced 2026-11-28 08:15:03 +03:00
Edit page button
This commit is contained in:
1 parent
ab2750c248
commit
f3f68db3d8
2 files changed
+14
-13
No files matched your search
@@ -8,5 +8,10 @@ hexo.extend.helper.register("contributing", function () {
|
||||
|
||||
|
||||
hexo.extend.helper.register("edit_page", function () {
|
||||
return `https://github.com/Fechin/reference/blob/main/source/_posts/${this.page.slug}.md`
|
||||
let postPage = this.page['layout'] === 'post';
|
||||
let url = "https://github.com/Fechin/reference";
|
||||
if (postPage) {
|
||||
url += `/blob/main/source/_posts/${this.page.slug}.md`;
|
||||
}
|
||||
return url;
|
||||
});
|
||||
Reference in new issue
Block a user