# Usage: `Key: /link/ || icon`# Key is the name of menu item. If the translation for this item is available, the translated text will be loaded, otherwise the Key name will be used. Key is case-sensitive.# Value before `||` delimiter is the target link, value after `||` delimiter is the name of Font Awesome icon.# External url should start with http:// or https://menu:home:/ || fa fa-home#about: /about/ || fa fa-usertags:/tags/ || fa fa-tagscategories:/categories/ || fa fa-tharchives:/archives/ || fa fa-archive#schedule: /schedule/ || fa fa-calendar#sitemap: /sitemap.xml || fa fa-sitemap#commonweal: /404/ || fa fa-heartbeat# Enable / Disable menu icons / item badges.menu_settings:icons:truebadges:true
侧边栏
默认头像会开启旋转功能,花里胡哨的而且旋转有点快,个人选择了关闭
1
2
3
4
5
6
7
8
# Sidebar Avataravatar:# Replace the default image and set the url here.url:/images/avatar.gif# If true, the avatar will be displayed in circle.rounded:true# If true, the avatar will be rotated with the cursor.rotated:false
# Posts / Categories / Tags in sidebar.site_state:false
其他社交网站的主页的配置起来也很简单,简单替换一下链接,并且取消注释即可
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# 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/ywang-wnlo || fab fa-githubE-Mail:mailto:[email protected] || fa fa-envelope#Weibo: https://weibo.com/yourname || fab fa-weibo#Google: https://plus.google.com/yourname || 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
本地搜索
本地搜索可以快速的检索所有的文章,有时候还是很有用的
配置本地搜索之前,首先要在 hexo 下安装插件
1
npminstallhexo-generator-searchdb--save
然后在配置中开启即可
1
2
3
4
5
6
7
8
9
10
11
12
13
# Local Search# Dependencies: https://github.com/next-theme/hexo-generator-searchdblocal_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 -1top_n_per_article:-1# Unescape html strings to the readable one.unescape:true# Preload the search data when the page loads.preload:false
代码块
代码块的高亮有很多种配色可以选,并且可以开启一键复制功能
1
2
3
4
5
6
7
8
9
10
11
12
13
14
codeblock:# Code Highlight theme# All available themes: https://theme-next.js.org/highlight/theme:light:vsdark:vs2015prism:light:prismdark:prism-dark# Add copy button on codeblockcopy_button:enable:true# Available values: default | flat | macstyle:default
动画效果
NexT 默认开启了动画效果,但是感觉比较慢,感觉有些影响阅读,推荐开启 async,并且适当的修改动画效果
# Use Animate.css to animate everything.# For more information: https://animate.stylemotion:enable:trueasync:truetransition:# All available transition variants: https://theme-next.js.org/animate/post_block:fadeInpost_header:post_body:coll_header:# Only for Pisces | Gemini.sidebar:fadeInDown
back2top:enable:true# Back to top in sidebar.sidebar:false# Scroll percent label in b2t button.scrollpercent:true# Reading progress barreading_progress:enable:true# Available values: left | rightstart_at:left# Available values: top | bottomposition:bottomreversed:falsecolor:"#37c6c0"height:5px
书签
NexT 的书签功能可以保存当前的阅读进度,下次打开是会在续接该进度
1
2
3
4
5
6
7
8
# Bookmark Supportbookmark:enable:true# Customize the color of the bookmark.color:"#222"# If auto, save the reading progress when closing the page or clicking the bookmark-icon.# If manual, only save it by clicking the bookmark-icon.save:auto
# Mermaid tagmermaid:enable:true# Available themes: default | dark | forest | neutraltheme:light:neutraldark:dark
lazyload
lazyload 是网站常用的技术,通过按需加载,避免一次性加载过多内容导致的打开缓慢
1
2
3
# Vanilla JavaScript plugin for lazyloading images.# For more information: https://apoorv.pro/lozad.js/demo/lazyload:true
fancybox
fancybox 可以在点击图片时放大该图片,并且可以快速浏览当前文章的所有图片
1
2
3
# FancyBox is a tool that offers a nice and elegant way to add zooming functionality for images.# For more information: https://fancyapps.com/fancybox/fancybox:true
# Pangu Support# For more information: https://github.com/vinta/pangu.js# Server-side plugin: https://github.com/next-theme/hexo-pangupangu:true
捐赠
文章末尾还可以求打赏,需要配置好相应的二维码图片,并且可以修改提示语句
1
2
3
4
5
6
7
8
9
10
11
12
13
# Donate (Sponsor) settings# Front-matter variable (nonsupport animation).reward_settings:# If true, a donate button will be displayed in every article by default.enable:trueanimation:falsecomment:赏个鸡腿🍗reward:wechatpay:/images/wechatpay.pngalipay:/images/alipay.jpg#paypal: /images/paypal.png#bitcoin: /images/bitcoin.png
版权声明
NexT 内置了文章末尾增加版权声明,只需手动开启即可
1
2
3
4
5
6
7
8
9
10
11
12
# Creative Commons 4.0 International License.# See: https://creativecommons.org/about/cclicenses/creative_commons:# Available values: by | by-nc | by-nc-nd | by-nc-sa | by-nd | by-sa | cc-zerolicense:by-nc-sa# Available values: big | smallsize:smallsidebar:falsepost:true# 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.orglanguage:
# Show Views / Visitors of the website / page with busuanzi.# For more information: http://ibruce.info/2015/04/04/busuanzi/busuanzi_count:enable:truetotal_visitors:truetotal_visitors_icon:fa fa-usertotal_views:truetotal_views_icon:fa fa-eyepost_views:truepost_views_icon:far fa-eye
# Multiple Comment System Supportcomments:# Available values: tabs | buttonsstyle:tabs# Choose a comment system to be displayed by default.# Available values: disqus | disqusjs | changyan | livere | gitalk | utterancesactive:gitalk# Setting `true` means remembering the comment system selected by the visitor.storage:true# Lazyload all comment systems.lazyload:true# Modify texts or order for any naves, here are some examples.nav:#disqus:# text: Load Disqus# order: -1#gitalk:# order: -2
在 gitalk 配置中填上相应的内容
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Gitalk# For more information: https://gitalk.github.iogitalk:enable:truegithub_id:<GitHub id># GitHub repo ownerrepo:<GitHub id>.github.io# Repository name to store issuesclient_id:<应用 id># GitHub Application Client IDclient_secret:<应用密钥># GitHub Application Client Secretadmin_user:<GitHub id># GitHub repo owner and collaborators, only these guys can initialize gitHub issuesdistraction_free_mode:true# Facebook-like distraction free mode# When the official proxy is not available, you can change it to your own proxy addressproxy:https://cors-anywhere.azm.workers.dev/https://github.com/login/oauth/access_token# This is official proxy address# Gitalk's display language depends on user's browser or system environment# If you want everyone visiting your site to see a uniform language, you can set a force language value# Available values: en | es-ES | fr | ru | zh-CN | zh-TWlanguage: