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:
ymkiux 2022-10-11 22:52:21 +08:00 committed by GitHub
parent efedf58c19
commit 12c380c4df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -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 {