diff --git a/_data/widgets.yml b/_data/widgets.yml index 6bb4cd7..1296f71 100644 --- a/_data/widgets.yml +++ b/_data/widgets.yml @@ -66,5 +66,5 @@ welcome: timeline: layout: timeline title: 近期动态 - api: https://api.github.com/repos/xaoxuu/hexo-theme-stellar/issues + api: # https://api.github.com/repos/xaoxuu/hexo-theme-stellar/issues user: diff --git a/scripts/tags/friends.js b/scripts/tags/friends.js index 1ce29b4..68c7951 100644 --- a/scripts/tags/friends.js +++ b/scripts/tags/friends.js @@ -2,28 +2,28 @@ * friends.js v2 | https://github.com/xaoxuu/hexo-theme-stellar/ * 格式与官方标签插件一致使用空格分隔,中括号内的是可选参数(中括号不需要写出来) * - * {% friends [group] [repo:owner/repo] [data:http] %} + * {% friends [group] [repo:owner/repo] [api:http] %} */ 'use strict'; hexo.extend.tag.register('friends', function(args) { - args = hexo.args.map(args, ['repo', 'data'], ['group']); + args = hexo.args.map(args, ['repo', 'api'], ['group']); var links = hexo.locals.get('data').links; if (links == undefined) { links = {}; } - var data; - if (args.data) { - data = args.data; + var api; + if (args.api) { + api = args.api; } else if (args.repo) { - data = 'https://raw.github.xaoxuu.com/' + args.repo + '/output/v2/data.json'; + api = 'https://raw.github.xaoxuu.com/' + args.repo + '/output/v2/data.json'; } var el = '