diff --git a/_config.yml b/_config.yml index 393421e..0be0715 100755 --- a/_config.yml +++ b/_config.yml @@ -1,4 +1,7 @@ # >> 主题配置 --------------------------------------------------------------------- +# 字体 在这里选好你需要的字体:https://fonts.google.com,然后在_defines.less中修改font_family。 +google_fonts: 'Ubuntu|Ubuntu+Mono' + # 导航栏 nav_menu: - name: 主页 diff --git a/layout/_partial/head.ejs b/layout/_partial/head.ejs index c766501..a9fba3a 100755 --- a/layout/_partial/head.ejs +++ b/layout/_partial/head.ejs @@ -26,7 +26,11 @@ - + <% if (config.google_fonts){ %> + + <% } else { %> + + <% } %> diff --git a/source/less/_defines.less b/source/less/_defines.less index 3919eec..09dcc50 100755 --- a/source/less/_defines.less +++ b/source/less/_defines.less @@ -55,9 +55,10 @@ // start: 字体 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> // 大部分文字字体 -@fontfamily_base: 'Ubuntu', Menlo, Monaco, Helvetica, "Hiragino Sans GB", "Hiragino Sans GB W3", Source Han Sans CN Regular, WenQuanYi Micro Hei, "Microsoft YaHei", Arial, sans-serif; +@fontfamily_base: 'Ubuntu', "Source Sans Pro", "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Hiragino Sans GB W3", Menlo, Monaco, Source Han Sans CN Regular, WenQuanYi Micro Hei, "Microsoft YaHei", Arial, sans-serif; // 代码字体 -@fontfamily_code: Menlo, Monaco, "Lucida Console", monospace, "Microsoft YaHei", Helvetica, Arial, sans-serif; +// mac自带Menlo字体,windows用户需要在config中添加以下字段来加载在线字体:google_fonts: 'Ubuntu|Ubuntu+Mono' +@fontfamily_code: Menlo, 'Ubuntu Mono', Monaco, "Lucida Console", 'Source Code Pro', "Microsoft YaHei", Helvetica, Arial, sans-serif, 'Ubuntu', monospace; // LOGO字体 @fontfamily_logo: @fontfamily_base; // end: 字体 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<