# Sidebar Avatar avatar: # Replace the default image and set the url here. url: /images/avatar.png # 你自己的图片名称或完整的网络图片地址 # If true, the avatar will be dispalyed in circle. rounded: true # 是否为圆形头像 # If true, the avatar will be rotated with the cursor. rotated: false # 设置成 true ,鼠标放上去会不停转圈
代码块样式设置
打开 主题配置文件 ,搜索 codeblock 关键字,设置如下
script
1 2 3 4 5 6 7 8 9 10 11 12
codeblock: # Code Highlight theme # Available values: normal | night | night eighties | night blue | night bright | solarized | solarized dark | galactic # See: https://github.com/chriskempson/tomorrow-theme highlight_theme: night eighties # 高亮主题 # Add copy button on codeblock copy_button: enable: true # 是否显示复制按钮 # Show text copy result. show_result: true # 是否显示复制结果 # Available values: default | flat | mac style: default # 复制按钮样式
回到顶部按钮设置
打开 主题配置文件 ,搜索 back2top 关键字,设置如下
script
1 2 3 4 5 6
back2top: enable: true # Back to top in sidebar. sidebar: true # Scroll percent label in b2t button. scrollpercent: true
# Social Links # Usage: `Key: permalink || icon` # Key is the link label showing to end users. # Value before `||` delimiter is the target permalink, value after `||` delimiter is the name of Font Awesome icon. social: GitHub: https://github.com/leezhiy || fab fa-github E-Mail: mailto:18500754397@163.com || fa fa-envelope 微博: https://weibo.com/5678634433 || fab fa-weibo 知乎: https://www.zhihu.com/people/li-zhi-yuan-13-7 || fa fa-globe Gitee: https://gitee.com/leezhiy || fab fa-git 网易云: https://music.163.com/#/user/home?id=131550901 || fa fa-music #Google: https://plus.google.com/youname || fab fa-google #Twitter: https://twitter.com/yourname || fab fa-twitter #FB Page: https://www.facebook.com/yourname || fab fa-facebook #StackOverflow: https://stackoverflow.com/yourname || fab fa-stack-overflow #YouTube: https://youtube.com/yourname || fab fa-youtube #Instagram: https://instagram.com/yourname || fab fa-instagram #Skype: skype:yourname?call|chat || fab fa-skype
# Use icon instead of the symblo # to indicate the tag at the bottom of the post tag_icon: true
设置打赏
打开 主题配置文件 ,搜索 reward 关键字,设置如下
script
1 2 3 4 5 6 7 8 9 10 11 12 13
# Reward (Donate) # Front-matter variable (unsupport animation). reward_settings: # If true, reward will be displayed in every article by default. enable: ture #打赏开关 animation: false comment: 如果你觉得这篇文章对你有用,欢迎赞赏哦~
# --------------------------------------------------------------- # Font Settings # See: https://theme-next.org/docs/theme-settings/#Fonts-Customization # --------------------------------------------------------------- # Find fonts on Google Fonts (https://www.google.com/fonts) # All fonts set here will have the following styles: # light | light italic | normal | normal italic | bold | bold italic # Be aware that setting too much fonts will cause site running slowly # --------------------------------------------------------------- # To avoid space between header and sidebar in scheme Pisces / Gemini, Web Safe fonts are recommended for `global` (and `title`): # Arial | Tahoma | Helvetica | Times New Roman | Courier New | Verdana | Georgia | Palatino | Garamond | Comic Sans MS | Trebuchet MS # ---------------------------------------------------------------
font: enable: true
# Uri of fonts host, e.g. https://fonts.googleapis.com (Default). host:
# Font options: # `external: true` will load this font family from `host` above. # `family: Times New Roman`. Without any quotes. # `size: x.x`. Use `em` as unit. Default: 1 (16px)
# Global font settings used for all elements inside <body>. global: external: true family: Lato size:
# Font settings for site title (.site-title). title: external: true family: Lobster Two size:
# Font settings for headlines (<h1> to <h6>). headings: external: true family: Amita size:
# Font settings for posts (.post-body). posts: external: true family:
# Font settings for <code> and code blocks. codes: external: true family:
footer: # Specify the date when the site was setup. If not defined, current year will be used. since: 2015 # 网站开始年份
# Icon between year and copyright info. icon: # Icon name in Font Awesome. See: https://fontawesome.com/icons name: fa fa-heart # 底部图标 # If you want to animate the icon, set it to true. animated: true # 动画效果 # Change the color of icon, using Hex Code. color: "#ff0000"
# If not defined, `author` from Hexo `_config.yml` will be used. copyright: # 版权信息
# Powered by Hexo & NexT powered: false # 是否显示 Powered by Hexo & NexT
# Beian ICP and gongan information for Chinese users. See: http://www.beian.miit.gov.cn, http://www.beian.gov.cn beian: # 备案信息 enable: false icp: # The digit in the num of gongan beian. gongan_id: # 公安备案ID # The full num of gongan beian. gongan_num: # 公安备案编号 # The icon for gongan beian. See: http://www.beian.gov.cn/portal/download gongan_icon_url: # 公安备案图标
版权信息设置
打开 主题配置文件 ,搜索 creative_commons 关键字,设置如下
script
1 2 3 4 5 6 7 8 9 10
# Creative Commons 4.0 International License. # See: https://creativecommons.org/share-your-work/licensing-types-examples # Available values of license: by | by-nc | by-nc-nd | by-nc-sa | by-nd | by-sa | zero # You can set a language value if you prefer a translated version of CC license, e.g. deed.zh # CC licenses are available in 39 languages, you can find the specific and correct abbreviation you need on https://creativecommons.org creative_commons: license: by-nc-sa # 版权信息类别 选项: by | by-nc | by-nc-nd | by-nc-sa | by-nd | by-sa | zero sidebar: true # 侧边栏显示状态 post: true # 文章底部显示状态 language:
第三方插件
本地搜索
打开博客目录,运行 git bash ,安装插件
script
1
$ npm install hexo-generator-searchdb --save
打开 主题配置文件 ,搜索 local_search 关键字,设置如下
script
1 2 3 4 5 6 7 8 9 10 11 12 13
# Local Search # Dependencies: https://github.com/theme-next/hexo-generator-searchdb local_search: enable: true # If auto, trigger search by changing input. # If manual, trigger search by pressing enter key or search button. trigger: auto # Show top n results per article, show all results by setting to -1 top_n_per_article: 3 # Unescape html strings to the readable one. unescape: false # Preload the search data when the page loads. preload: false
添加相关文章
打开博客目录,运行 git bash ,安装插件
script
1
$ npm install hexo-related-popular-posts --save
打开 主题配置文件 ,搜索 related_posts 关键字,设置如下
script
1 2 3 4 5 6 7 8 9 10 11 12
# Related popular posts # Dependencies: https://github.com/tea3/hexo-related-popular-posts related_posts: enable: true title: # Custom header, leave empty to use the default one display_in_home: true params: maxCount: 5 #PPMixingRate: 0.0 #isDate: false #isImage: false #isExcerpt: false
博客图片插件
打开博客目录,运行 git bash ,安装插件
script
1
$ npm install medium-zoom
打开 主题配置文件 ,搜索 mediumzoom 关键字,设置如下
script
1 2 3 4
# A JavaScript library for zooming images like Medium. # Do not enable both `fancybox` and `mediumzoom`. # For more information: https://github.com/francoischalifour/medium-zoom mediumzoom: true
中英文之间自动加空格
打开博客目录,运行 git bash ,安装插件
script
1
$ npm install pangu --save
打开 主题配置文件 ,搜索 pangu 关键字,设置如下
script
1 2 3
# Pangu Support # For more information: https://github.com/vinta/pangu.js pangu: true
# Easily enable fast Ajax navigation on your website. # Dependencies: https://github.com/theme-next/theme-next-pjax pjax: true
懒加载
打开博客目录,运行 git bash ,安装插件
script
1
$ npm install --save lozad
打开 主题配置文件 ,搜索 lazyloag 关键字,设置如下
script
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
# 修改一 # Vanilla JavaScript plugin for lazyloading images. # For more information: https://github.com/ApoorvSaxena/lozad.js lazyload: true
# 修改二 comments: # Available values: tabs | buttons style: tabs # Choose a comment system to be displayed by default. # Available values: changyan | disqus | disqusjs | gitalk | livere | valine active: # Setting `true` means remembering the comment system selected by the visitor. storage: true # Lazyload all comment systems. lazyload: true
filter_optimize: enable: true # remove the surrounding comments in each of the bundled files remove_comments: false css: # minify all css files minify: true # bundle loaded css files into one bundle: true # use a script block to load css elements dynamically delivery: true # make specific css content inline into the html page # - only support the full path # - default is ['css/main.css'] inlines: excludes: js: # minify all js files minify: true # bundle loaded js files into one bundle: true excludes: #set the priority of this plugin, # lower means it will be executed first, default of Hexo is 10 priority: 12