diff --git a/_config.yml b/_config.yml index 9b47d2e..bd289da 100644 --- a/_config.yml +++ b/_config.yml @@ -2,11 +2,19 @@ # Your basic info # --------------------------------------------------------------------------------------- base_info: + # Your website title title: Keep Theme + + # Your blog author name author: Keep Team + + # Your website url url: https://keep.xpoet.cn/ - # Logo image (You can use local image, image external link or don’t fill) - logo_img: + + # Your website logo image + # You can use local image, image external link or don’t fill + logo: /images/logo.svg + # --------------------------------------------------------------------------------------- # Theme style settings diff --git a/layout/_partial/header.ejs b/layout/_partial/header.ejs index 93c5b75..6c241dd 100644 --- a/layout/_partial/header.ejs +++ b/layout/_partial/header.ejs @@ -1,14 +1,19 @@
+ <% + const { title, logo, logo_img } = theme.base_info + const { title: configTitle } = config + %> +
diff --git a/source/css/layout/_partial/header.styl b/source/css/layout/_partial/header.styl index 444bf6b..bb4ab0a 100644 --- a/source/css/layout/_partial/header.styl +++ b/source/css/layout/_partial/header.styl @@ -50,7 +50,7 @@ $logo-image-box-width = 46px; } - if (hexo-config('base_info.logo_img') && hexo-config('base_info.logo_img') != '') { + if (hexo-config('base_info.logo_img') || hexo-config('base_info.logo')) { .logo-image { width: $logo-image-box-width; height: $logo-image-box-width;