diff --git a/scripts/tags/link.js b/scripts/tags/link.js index 7a508fd..129a06d 100644 --- a/scripts/tags/link.js +++ b/scripts/tags/link.js @@ -11,7 +11,16 @@ const full_url_for = require('hexo-util').full_url_for.bind(hexo); hexo.extend.tag.register('link', function(args) { args = hexo.args.map(args, ['icon', 'desc'], ['url', 'title']); - + var autofill = []; + if (!args.title) { + autofill.push('title'); + } + if (!args.icon) { + autofill.push('icon'); + } + if (args.desc) { + autofill.push('desc'); + } var el = ''; el += '