diff --git a/_config.yml b/_config.yml index 802d7bb..9da60cd 100755 --- a/_config.yml +++ b/_config.yml @@ -350,3 +350,8 @@ default: link: https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/link/8f277b4ee0ecd.svg cover: https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/cover/76b86c0226ffd.svg image: https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/image/2659360.svg + +api_host: + ghapi: https://api.github.com + ghraw: https://raw.githubusercontent.com + gist: https://gist.github.com \ No newline at end of file diff --git a/layout/_partial/sidebar/widgets/ghissues.ejs b/layout/_partial/sidebar/widgets/ghissues.ejs index 0f5bced..0d73a38 100644 --- a/layout/_partial/sidebar/widgets/ghissues.ejs +++ b/layout/_partial/sidebar/widgets/ghissues.ejs @@ -18,7 +18,7 @@ function layoutDiv() { if (repo == undefined) { return el; } - item.api = 'https://api.github.com/repos/' + repo + '/issues?per_page=' + item.limit; + item.api = theme.api_host.ghapi + '/repos/' + repo + '/issues?per_page=' + item.limit; if (item.labels) { item.api += '&labels=' + item.labels; } diff --git a/layout/_partial/sidebar/widgets/ghrepo.ejs b/layout/_partial/sidebar/widgets/ghrepo.ejs index af1c13b..f302d28 100644 --- a/layout/_partial/sidebar/widgets/ghrepo.ejs +++ b/layout/_partial/sidebar/widgets/ghrepo.ejs @@ -22,7 +22,7 @@ function layoutDiv() { el += '