Update about.js (#124)
* Update about.js the default is to use the contents of the avatar parameter in _config.yml without the avatar parameter * Update about.js Co-authored-by: Mr. X <16400144+xaoxuu@users.noreply.github.com>
This commit is contained in:
parent
efedf58c19
commit
12c380c4df
|
@ -17,9 +17,13 @@ hexo.extend.tag.register('about', function(args, content) {
|
|||
el += '<div class="tag-plugin about">';
|
||||
el += '<div class="about-header">';
|
||||
// avatar
|
||||
if (args.avatar) {
|
||||
var avatar_url = args.avatar;
|
||||
if (args.avatar === undefined) {
|
||||
avatar_url = hexo.config.avatar;
|
||||
}
|
||||
if (avatar_url) {
|
||||
el += '<div class="avatar">'
|
||||
el += '<img src="' + args.avatar + '"';
|
||||
el += '<img src="' + avatar_url + '"';
|
||||
if (args.height && args.height.length > 0) {
|
||||
el += ' height="' + args.height + '"/>';
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue